I've got a cluster with 84 Openstack Essex compute nodes, one of which decided to pine for the fjords about 2 hours ago, with 8 running instances on it.

The instances are all running off qcow2 disks on an NFS share, so the disk images are still available.

nova live-migration only seems capable of migrating a running instance from one functioning node to another.

What I want is to 'migrate' the dead instances from the dead compute node to any of the live compute nodes. The fact that the instances will be rebooted (and will have to fsck on boot) doesn't really matter - it's better than losing them completely.

Before I start acting on thoughts about messing with virsh and hacking nova's mysql database directly, does anyone know of any tool or documented procedure for this kind of 'dead-migration'?

  • Craig this is very interesting topic, I'm looking forward to the answer. I suggest you to forward it to Openstack dev mailing list.
    – so_user
    Aug 8, 2012 at 19:46

4 Answers 4


It is old question, but yes you can with nova evacuate command. Example to move vm_name to nova_compute1 node:

nova evacuate vm_name nova_compute1 
nova reboot --hard vm_name

Instance will be booted on new node.


I never done this. I hope this reference help you to recover the instances.


  • Thanks, but i've seen that. It's not really related to what I needed to do. One of my colleagues ended up editing the nova mysql instances table directly and some manual stuffing around with virsh define, virsh nwdefine, and virst start on the target node. The sort of thing that really should be automated.
    – cas
    Aug 5, 2012 at 9:57
  • The link appears to be dead.
    – killjoy
    Sep 18, 2019 at 14:52

In newer openstack client you can use:

openstack server evacuate $SERVER_ID

Openstack instance migration has successful only after following steps.

both host machines need to connect ssh without password for user nova.

For that we need to create a key pair with ssh-keygen after running command su nova

# usermod -s /bin/bash nova
# su nova
# ssh-keygen

key pair will generate in /var/lib/nova/.ssh

#cat <pub_key> >> /var/lib/nova/.ssh/authorized_keys
#echo 'StrictHostKeyChecking no' >> /var/lib/nova/.ssh/config

Do the above steps to the second host.

copy the public key(id_rsa.pub) from the first host to second host and add to authorized keys by running the following command

#cat <pub_key> >> /var/lib/nova/.ssh/authorized_keys

copy the public key(id_rsa.pub) from the Second host to first host and add to authorized keys The authorized keys file in /var/lib/nova/.ssh/ should contain public key from both host. then

# su nova
# ssh nova@otherhost should connect without password.

Then Openstack migration will work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.