Linode Instances

DC Migration/Pending Host Migration Initiate

post
https://api.linode.com/v4/linode/instances/{linodeId}/migrate

Initiate a pending host migration that has been scheduled by Linode or initiate a cross data center (DC) migration. A list of pending migrations, if any, can be accessed from GET /account/notifications. When the migration begins, your Linode will be shutdown if not already off. If the migration initiated the shutdown, it will reboot the Linode when completed.

To initiate a cross DC migration, you must pass a region parameter to the request body specifying the target data center region. You can view a list of all available regions and their feature capabilities from GET /regions. If your Linode has a DC migration already queued or you have initiated a previously scheduled migration, you will not be able to initiate a DC migration until it has completed.

Note: Next Generation Network (NGN) data centers do not support IPv6 /116 pools or IP Failover. If you have these features enabled on your Linode and attempt to migrate to an NGN data center, the migration will not initiate. If a Linode cannot be migrated because of an incompatibility, you will be prompted to select a different data center or contact support.

Path Parameters

linodeId
Required
integer

ID of the Linode to migrate.

Request Body Schema

region
string

The region to which the Linode will be migrated. Must be a valid region slug. A list of regions can be viewed by using the GET /regions endpoint. A cross data center migration will cancel a pending migration that has not yet been initiated. A cross data center migration will initiate a linode_migrate_datacenter_create event.

upgrade
boolean

When initiating a cross DC migration, setting this value to true will also ensure that the Linode is upgraded to the latest generation of hardware that corresponds to your Linode's Type, if any free upgrades are available for it. If no free upgrades are available, and this value is set to true, then the endpoint will return a 400 error code and the migration will not be performed. If the data center set in the region field does not allow upgrades, then the endpoint will return a 400 error code and the migration will not be performed.

Request Samples

curl -H "Content-Type: application/json" \
  -H "Authorization: Bearer $TOKEN" \
    -X POST -d '{
      "region": "us-central"
    }' \
    https://api.linode.com/v4/linode/instances/123/migrate

Response Samples

{}

Responses

200: Scheduled migration started

default: Error

errors
array of objects
reason
string

What happened to cause this error. In most cases, this can be fixed immediately by changing the data you sent in the request, but in some cases you will be instructed to open a Support Ticket or perform some other action before you can complete the request successfully.

field
string

The field in the request that caused this error. This may be a path, separated by periods in the case of nested fields. In some cases this may come back as "null" if the error is not specific to any single element of the request.