[openstack-dev] [nova] post-copy live migration

Luis Tomas luis at cs.umu.se
Tue Apr 5 15:17:41 UTC 2016


Hi,

We are working on the possibility of including post-copy live migration 
into Nova (https://review.openstack.org/#/c/301509/)

At libvirt level, post-copy live migration works as follow:
     - Start live migration with a post-copy enabler flag 
(VIR_MIGRATE_POSTCOPY). Note this does not mean the migration is 
performed in post-copy mode, just that you can switch it to post-copy at 
any given time.
     - Change the migration from pre-copy to post-copy mode.

However, we are not sure what's the most convenient way of providing 
this functionality at Nova level.
The current specs, propose to include an optional flag at the live 
migration API to include the VIR_MIGRATE_POSTCOPY flag when starting the 
live migration. Then we propose a second API to actually switch the 
migration from pre-copy to post-copy mode similarly to how it is done in 
LibVirt. This is also similar to how the new "force-migrate" option 
works to ensure migrations completion. In fact, this method could be an 
extension of the force-migrate, by switching to postcopy if the 
migration was started with the VIR_MIGRATE_POSTCOPY libvirt flag, or 
pause it otherwise.

The cons of this approach are that we expose a too specific mechanism 
through the API. To alleviate this, we could remove the "switch" API, 
and automatize the switch based on data transferred, available bandwidth 
or other related metrics. However we will still need the extension to 
the live-migration API to include the proper libvirt postcopy flag.

The other solution is to start all the migrations with the 
VIR_MIGRATE_POSTCOPY mode, and therefore no new APIs would be needed. 
The system could automatically detect the migration is taking too long 
(or is dirting memory faster than the sending rate), and automatically 
switch to post-copy.

The cons of this is that including the VIR_MIGRATE_POSTCOPY flag has an 
overhead, and it will not be desirable to included for all migrations, 
specially is they can be nicely migrated with pre-copy mode. In 
addition, if the migration fails after the switching, the VM will be 
lost. Therefore, admins may want to ensure that post-copy is not used 
for some specific VMs.

I would like to know your opinion in this? What option would be 
preferred? Is there a different option we are missing?

Thanks!

Best regards,
Luis

-- 
-----------------------------------
Dr. Luis Tomás
Postdoctoral Researcher
Department of Computing Science
Umeå University
luis at cs.umu.se
www.cloudresearch.se
www8.cs.umu.se/~luis
------------------------------------




More information about the OpenStack-dev mailing list