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.
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). E.g.:
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