Live migration for instances created on ephemeral storage

To migrate an instance from a compute node to another one, you can use the "openstack server migrate" command with the '–block-migration' option, after having sourced the admin openrc script. E.g.:

openstack server migrate --live cld-np-14.cloud.pd.infn.it --block-migration e1914906-7e33-4d30-88f0-785130fdd85d

This will live migrate the instance with uuid e1914906-7e33-4d30-88f0-785130fdd85d to the compute node cld-np-14.cloud.pd.infn.it.


In train the "–live" option is deprecated. You can use:



openstack server migrate --live-migration --host compute-03.cloud.pd.infn.it --block-migration --os-compute-api-version 2.79 92c413cb-d6f2-4103-9042-9e2e85257029



The command doesn't work if source and target hypervisor aren't compatible. The error would be something like:

Unacceptable CPU info: CPU doesn't have compatibility

In this case, please find another compatible hypervisor, or you can use cold migration (i.e. the VM will be powered off during the migration)


Cold migration for instances created on ephemeral storage


nova migrate e1914906-7e33-4d30-88f0-785130fdd85d --host cld-np-14.cloud.pd.infn.it

When the migration has been completed, the status of the server is "VERIFY_RESIZE". You will then need to confirm the operation:

nova resize-confirm e1914906-7e33-4d30-88f0-785130fdd85d

For instances booted from volumes


To migrate an instance from a compute node to another one, you can use the "openstack server migrate" command, after having sourced the admin openrc script. E.g.:

openstack server migrate --live cld-nl-19.cloud.pd.infn.it 298c94e2-e4ec-478c-8347-c77f7e1cc8df


If source and target hypervisor aren't compatible, you will get an error message. In this case find another compatible target hypervisor or use cold migration (see above).


Troubleshooting


If source and target compute nodes have different settings for SELINUX (e.g. 'disabled' vs 'permissive') live migration will fail. No errors will be reported when issuing the command and no errors will be reported in the output of "openstack server event list <uuid> command". In the nova log of the compute node you will see something like:

libvirtError: unsupported configuration: Unable to find security driver for model selinux

Related articles

Related articles appear here based on the labels you select. Click to edit the macro and add or change labels.



Related issues