Scheduling for live migration

Registered by Dmitry Russkikh

Currently live-migration operation wants us to specify destination host for VM. It would be usefull to have ability to utilize scheduler for choosing destination host.

Blueprint information

Vish Ishaya
Hans Lindgren
Series goal:
Accepted for grizzly
Milestone target:
milestone icon 2013.1
Started by
Russell Bryant
Completed by
Russell Bryant

Related branches



if I understood your question correctly, it means we need a load monitoring tool that has been installed and utlity scheduler will report which host could be possibled used for
live migration. is that what you mean?

That's one of the possible cases.
The other one introduces states for compute hosts and when a host brought to "maintenance" - all VMs should be migrated from it in accordance with defined scheduling rules.

In the case of scheduling rules, which part of code is in charge of this? and if all VMs have been offline, does any schedule apply?

As far as I know, nova-scheduler.
With no difference whether VM offline or not, Scheduler will be used just to pick target host according to common rules. The difference with existing functionality is that now for live-migration we have to specify instance to be migrated and target compute host. What proposed is to ask scheduler to provide us with the most suitable target host.

(sorry, this is the only way I could see to write a comment on a blueprint)
One additional concern that should be taken into consideration when choosing a host to live migrate to is the CPU compatibility. It's pointless to choose the best host from the scheduler if the best host doesn't have a compatible CPU. OpenStack already knows how to check if the CPU is compatible during migration (using libvirt's compareCPU function), so I guess it shouldn't be too hard to do that same check during implicit destination host selection.

Gerrit topic:,topic:bp/live-migration-scheduling,n,z

Addressed by:
    Live migration with an auto selection of dest.

Addressed by:
    Live migration with an auto selection of dest

Addressed by:
    Add select_hosts to scheduler manager rpc


Work Items