OpenStack: Live migrate VM to another OpenStack hypervisor

VM=foo-u1804

# get current hypervisor
openstack server show ${VM} -c OS-EXT-SRV-ATTR:host -f value

# list avaiable hypervisors
openstack host list -c "Host Name" -c Service -f value | grep compute | cut -d" " -f1

# migrate VM
openstack server migrate ${VM} --live OS_COMPUTE_2

# get state
openstack server show ${VM} -c name -c OS-EXT-SRV-ATTR:host -c status -f value | paste - - -

# Links
https://docs.openstack.org/nova/pike/admin/live-migration-usage.html