How to live migrate instance between compute nodes in VIO
search cancel

How to live migrate instance between compute nodes in VIO

book

Article ID: 321859

calendar_today

Updated On:

Products

VMware VMware Integrated OpenStack

Issue/Introduction

This article provides information on how to live migrate instances in VMware Integrated OpenStack (VIO) and the limitations of live migration.

Environment

VMware Integrated OpenStack 4.x
VMware Integrated OpenStack 3.1.x
VMware Integrated OpenStack 5.x

Resolution

Note: The only supported instance migration in VIO is by using openstack tools. Live migration using vCenter or other methods that bypass OpenStack tools do not reflect in OpenStack metadata and disrupt OpenStack from managing instance.
 
To live migrate instances from VIO nodes:
 
  1. SSH to OMS server.
  2. SSH to one of the controllers (controller01 or controller02).
  3. Elevate privileges to the root user using sudo command.
  4. Run this command to define the required OpenStack variables to run OpenStack clients commands:

    Source cloudadmin.rc

    Note: Ensure to customize the RC file to reflect domain and project which are necessary to migrate the instance.

  5. Run this command to find the id of the instance:

    openstack server list | grep -i <name of instance>

    Example:

    openstack server list | grep -i server01
     
  6. Use one of these options to find the names of compute nodes:
     
    • openstack host list - look for host name with compute in the Service column.
    • openstack compute service list - look for the host with nova-compute in the Binary column.
       
  7. Live migrate the instance from one compute note to the other using CLI:
     

    openstack server migrate --live <name of compute node to migrate to> <id of the instance to migrate>

    Example:

    openstack server migrate --live compute02 19787fe6-86fe-47e1-a0b3-08cb47b237f6
  8. Monitor the live migration using the command:

    openstack server show <id of instance>


Additional Information

Limitations of live migration:
 
  • Live migration will fail if compute nodes use different virtual distributed switches with a message similar to:

    Currently connected network interface 'Network adapter 1' uses network 'DVSwitch: 8c 9a 18 50 ef 4c 6d 24-72 d0 14 68 20 b2 35 8d', which is not accessible. Checking compatibility of Virtual Machine against destination VSPHERE.LOCAL\Administrator vcsa-01a.corp.local.
     
  • For versions before 4.1: If instance migration includes storage migration and migrated instance has a volume attached, live migration will corrupt shadow VM. The VMDK from shadow VM will be migrated to the new compute node datastore and thus corrupt shadow VM.

    To work around this issue:

    Detach and attach volume to instance after migration.

    If the migrated instance has a volume with one or more snapshots, the detach will fail. Migration of instance with volumes with snapshot is not supported.
  • For version 4.1 and 5.0: If instance migration includes storage migration and migrated instance has a volume attached, the following command needs to be run prior to the migration:
sudo viocli ds-migrate-prep <datacenter> <datastore>
 
  • If the compute nodes has two distributed switches where one is present on both nodes, and the instance is connected to the distributed switch present on both nodes, the live migration will succeed but instance will stay connected to NSX portgroup (virtual wire) of the source distributed switch that overlaps source and destination nodes.
     
  • Live migration between vCenters is not supported.