Migrating instances on a multi-cloud system
This feature is available in IBM® Cloud Pak System Version 2.3.4 and it enables users to migrate virtual system instances that are deployed on a multi-cloud environment profile to a remote multi-cloud environment profile. This move is a hot migration with minimal or zero downtime. This feature is available for only Linux virtual machines and is not applicable for Windows virtual system instances. The workload migration can be done only by using the REST API.
- Take a backup of the virtual machines before you start the migration. If
problems occur in migration, the backup helps to restore the virtual machines.Note: Though snapshots are migrated from the source to target, you cannot restore a snapshot that is taken on the source after the virtual machine is migrated to the target.
- Make sure that no other migration is in running state. Only one migration is supported at a
time. Run the following GET REST API to check whether only one migration is running then:GET REST Request URL:
http://9.9.9.9/admin/resources/migrate_deployment?state=running
Note: In a multi-cloud system VSI migration, choose the source system where the source VSI was deployed (from the systems in the multi-cloud). Make sure that the target system is from the multi-cloud pair where the pattern was imported from the source system. Use the IP addresses of these source and target systems in the payload and target REST URL correctly for a smooth migration. - Make sure that Platform System Manager (PSM) services and compute nodes (CNS) are running and high availability (HA) is online.
- Go through the Planning the migration, Known issues, and Troubleshooting sections.
curl -k -X POST "https://<Target_System_IP_address>/admin/resources/migrate_deployment" --header "Content-Type: application/json" --header "X-IBM-PureSystem-API-Version: 1.0" --header "Authorization: Basic xyz" \
-d '{
"source_deployment_id": "",
"target_environment_profile_name": "",
"target_cgs_for_mr": "",
"instance_mapping": "",
"source_rack_ipaddress": "",
"source_admin_user": "",
"source_admin_password": "",
"name": "",
"state": "",
"target_ip_group": "",
"disable_multithread_vmrelocate": "",
"deletion_timeout_min": "",
"vm_user_credentials": "",
"migration_type": "3"
}
Type of instance | Description |
---|---|
source_deployment_id |
It is the deployment ID of the source and is a mandatory parameter. To
retrieve the deployment ID, do the following steps:
|
target_environment_profile_name |
It is the target environment profile name and is a mandatory
parameter. To retrieve the
target_environment_profile_name , do the following
steps:
Note: If the
target_environment_profile_name is not available, then use
target_environment_profile_id . For more information, see Known issues. |
target_cgs_for_mr |
It is the array of all target cloud group names for each of the target
virtual machines where workload is deployed and is a mandatory parameter. To retrieve the
|
target_cloud_group_name |
It is the target cloud group name where workload is deployed and is a
mandatory parameter. To retrieve the
target_cloud_group_name , do the following
steps:
|
migration_type |
For multi-cloud virtual system instance migration,
migration_type must be 3. The default value is 1. If you do not specify the value,
then single-cloud migration is triggered. |
instance_mapping |
This parameter consists of the placement information that is needed to
place the virtual machine on the target system from the target multi-cloud system. The format
is:
To
retrieve the virtual machine name from the Virtual System Instances page, do
these steps:
Follow the same structure for all the virtual machines from the source deployment.
|
source_rack_ipaddress |
It is the IP address of the source system and is a mandatory parameter. |
source_admin_password |
It is the password credentials of the admin user of the source system. |
target_ip_group |
It is a mandatory parameter. Note:
When you provide the payload, note these following points:
|
name |
It is the name of the migration job and is an optional parameter. |
state |
The value of the state is always start . It does not
accept any other value. |
premigration_validate |
It is an optional parameter and takes the following values:
Note: If no parameter is passed, validation gets triggered with default values. If validation
is successful, then migration occurs. The default value is yes.
|
migration_timeout_min |
It is an optional attribute available as a part of the payload. Though you can customize this value, the default value of 60 minutes is sufficient for most of the migration use cases. This attribute must be used if the complete migration time extends beyond 60 minutes. You can specify any valid positive numeric value based on your requirement. The operation waits either until the migration is complete or the specified time is reached. |
disable_multithread_vmrelocate |
It is relevant only for multi-virtual machine pattern migrations and is ignored for single virtual machine patterns. It is an optional boolean parameter with valid values “true” and “false”. At any particular point in time, there must not be more than one migration triggered on the target system. In few cases, it is observed that VMware encounters an issue when it relocates the two (or more than two) workloads simultaneously on target IBM Cloud Pak System. If this issue is observed, enable this flag to make it sequential automatically when you migrate the workload. |
deletion_timeout_min |
It is an optional attribute. In few cases, after a successful Virtual
System Instance migration on the target IBM Cloud Pak System,
deletion of source Virtual System Instance might take extra time due to workload. Though the default
value is 45 minutes, you can customize the time by using deletion_timeout_min
parameter. |
vm_user_credentials |
It is an optional attribute that is available as a part of the payload.
This attribute must be used in the request payload when the Windows or Linux virtual machine
password is changed before the migration. Note: As a best practice, always provide a value for
vm_user_credentials parameter. For a single node:
For
a
multi-node:
|
target_ip_group
,
target_environment_profile_name
, and target_cloud_group_name
are
case-sensitive. curl -X POST \
https://9.9.9.9/admin/resources/migrate_deployment \
-H 'Authorization: Basic xyz' \
-H 'Content-Type: application/json' \
-H 'X-IBM-PureSystem-API-Version: 1.0' \
-d '{
"source_deployment_id": "d-4dc5-b45f-b2a932486385",
"migration_type": "3",
"target_environment_profile_name": "ep_ip",
"source_rack_ipaddress": "9.9.9.9",
"target_cgs_for_mr": "['OS_Node_1':' Mobility01','OS_Node':'Mobility02']",
"instance_mapping": "['OS_Node_1.11707155654444':[ 9.9.9.9#9.9.9.9'], 'OS_Node.11707155654220':['9.9.9.9#9.9.9.9']]",
"source_admin_user": "mob_source",
"source_admin_password": "mob_source",
"name": "Testmigration",
"state": "start",
"target_ip_group" : "['OS_Node':['eth0':'9xmob2','eth1':'10xmob2'], 'OS_Node_1':['eth0':'9xmob2','eth1':'10xmob2']]",
"migration_timeout_min" : "120",
"vm_user_credentials": "['OS_Node':['user':'XXX','password':'YYY'], 'OS_Node_1':['user':'XXX','password':'YYY']]"