November 23, 2017

Create a transaction to migrate an instance from one dedicated host to another dedicated host.

Important manual pages:

Author: SoftLayer Technologies, Inc. <>

import SoftLayer
import json

USERNAME = 'set me'
API_KEY = 'set me'

virtualGuestIdToMigrate = 37117661
dedicatedHostTarget = 10201

client = SoftLayer.Client(username=USERNAME, api_key=API_KEY)
virtualGuestService = client['SoftLayer_Virtual_Guest']

    response = virtualGuestService.migrateDedicatedHost(dedicatedHostTarget, id=virtualGuestIdToMigrate)
    print(json.dumps(response, sort_keys=True, indent=2, separators=(',', ': ')))
except SoftLayer.SoftLayerAPIError as e:
    print("Unable to migrate the dedicated host. faultCode=%s, faultString=%s" % (e.faultCode, e.faultString))


We would love to hear it
Open an issue