You can live-migrate an OpenStack instance to a different compute node.

Note: Instances managed by VMware Integrated OpenStack must be migrated by using OpenStack commands. Do not use vCenter Server or other methods to migrate OpenStack instances.

Prerequisites

  • The source and target compute nodes must both be located within the same vCenter Server instance.
  • The source and target compute nodes must have at least one distributed switch in common. If two distributed switches are attached to the source compute node but only one distributed switch is attached to the target compute node, live migration will succeed but the OpenStack instance will be connected only to the port group of the distributed switch common to both compute nodes.
  • If you want to live-migrate an instance with a CD-ROM drive attached, verify that your environment has a shared datastore that can be accessed by all host.
    Important: Live migration of an instance with a CD-ROM drive attached is supported only in VMware Integrated OpenStack 5.1.0.1 or later.

Procedure

  1. Log in to the OpenStack Management Server as viouser.
  2. If the instance has a CD-ROM drive attached, configure a shared datastore for CD-ROM migration.
    1. If your deployment is not using a custom.yml file, copy the template custom.yml file to the /opt/vmware/vio/custom directory.
      sudo mkdir -p /opt/vmware/vio/custom
      sudo cp /var/lib/vio/ansible/custom/custom.yml.sample /opt/vmware/vio/custom/custom.yml
    2. Open the /opt/vmware/vio/custom/custom.yml file in a text editor.
    3. Uncomment the nova_shared_datastore_regex parameter and set its value to the name of the shared datastore in vSphere.
    4. Deploy the updated configuration.
      sudo viocli deployment configure

      Deploying the configuration briefly interrupts OpenStack services.

  3. Log in to the controller node as viouser.
  4. Switch to the root user and load the cloud administrator credentials file.
    sudo su -
    source ~/cloudadmin.rc
  5. Migrate the instance to the desired compute node.
    openstack server migrate compute-name instance-uuid --live
    • To find the name of a compute node, run the openstack host list command and view the Host Name column.
    • To find the UUID of the instance, run the openstack server list command and view the ID column.

What to do next

You can run the openstack server show instance-uuid command to confirm that the instance has been migrated to the desired compute node.