Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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'?

share|improve this question
    
Craig this is very interesting topic, I'm looking forward to the answer. I suggest you to forward it to Openstack dev mailing list. –  janisg Aug 8 '12 at 19:46

3 Answers 3

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

http://docs.openstack.org/essex/openstack-compute/admin/content/nova-disaster-recovery-process.html

share|improve this answer
    
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 '12 at 9:57

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.

share|improve this answer

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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