Ask Your Question

How to migrate a VM from one host to another

asked 2015-11-09 14:40:01 -0500

NewtoOpenstack gravatar image


We are working on a student project to show how VM migration works in openstack. We installed a fresh copy of Ubuntu 14.04 in VM workstaion followed by installtion of openstack through cloning devstack from git.

When we are trying a create a new VM using images, we are facing the following issues

  1. When trying to start a VM, we get the following error "No valid host was found. There are not enough hosts available." Here is the snapshot of the available hosts alt test

  2. We have a single host "ubuntu" and a single compute node in openstack. How can we perform migration if we have only one host available? Need help.



edit retag flag offensive close merge delete

5 answers

Sort by ยป oldest newest most voted

answered 2017-01-05 05:08:40 -0500

Mohan gravatar image

@NewtoOpenstack, Could you give us detailed steps on how to do Live migration in Openstack?

edit flag offensive delete link more


I would ask a new question instead of adding a comment to a year-old question. Anyway, you may want to start here, then also view the videos about migration in the Youtube channel of the OpenStack foundation.

Bernd Bausch gravatar imageBernd Bausch ( 2017-01-05 06:07:18 -0500 )edit

answered 2016-05-24 09:03:16 -0500

Dmytro Kryvoshei gravatar image

This option is removed starting liberty. What are the other options to enable migration to the same host?

edit flag offensive delete link more

answered 2015-11-11 22:35:14 -0500

Bipin gravatar image

You can make the following change in /etc/nova/nova.conf of the compute node. allow_migrate_to_same_host = True. But this will be for testing purposes only. If you want to test the real migration, you should have another compute host with Shared storage.

edit flag offensive delete link more


Thanks for your response!!!! We are now able to test the migration of instance, however to the same node :) do we need to perform the multi node installation setup for us to have another compute node? is that possible within a single machine/laptop?

NewtoOpenstack gravatar imageNewtoOpenstack ( 2015-11-13 13:24:45 -0500 )edit

Yes, you need at least two compute node to do the Migration. If you already virtualize your computer for multi-node installation, yes you can do it in your machine / laptop.

Bipin gravatar imageBipin ( 2015-11-22 03:10:15 -0500 )edit

answered 2015-11-09 22:00:13 -0500

shashidhar gravatar image

There are few things to ask you....did you try the following command for live migration,

root# nova live-migration test Devstack-3

Generally speaking "devstack" is the R & D version of OpenStack and this may not have all the fancy features which OpenStack provides by default. Also, did you try the latest Devstack cloning from git using the following command?

$ git clone -b stable/kilo

If yes, then there may be a some configuration or set-up that you might have missed.

edit flag offensive delete link more


Thanks for the reply!!! We have installed kilo using the above command and are able to test the migration (static) of instance to the same host (as we have a single compute host). Could you please tell if can establish a connection between compute nodes present in different machines for migration.

NewtoOpenstack gravatar imageNewtoOpenstack ( 2015-11-13 13:19:17 -0500 )edit

answered 2015-11-09 22:51:50 -0500

soumitrakarmakar gravatar image

In nova.conf file you need to change the value of allow_migration_to same host and if you want to migrate vm's among different hosts then you need to setup nfs and mount it to /var/lib/nova

edit flag offensive delete link more


Thanks for answering!! We are now able to migrate to the same host. Could you please tell how we can setup nfs shared storage in the single node installation setup. Do we need to go with multi node installation of openstack in order to achieve it?

NewtoOpenstack gravatar imageNewtoOpenstack ( 2015-11-13 13:21:08 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2015-11-09 14:40:01 -0500

Seen: 1,799 times

Last updated: Jan 05 '17