diff options
author | Alessandro Pilotti <ap@pilotti.it> | 2013-03-12 18:17:16 +0200 |
---|---|---|
committer | Alessandro Pilotti <ap@pilotti.it> | 2013-03-14 04:31:27 +0200 |
commit | c4c478dec76d5eb21b9cd3e8fe8e2f401872c848 (patch) | |
tree | 9cc9a6283c557aa786c6ec007cc0bfef44bd090c /nova/utils.py | |
parent | 6242afabe863e2e557b2ec3d909dfa40c3c55e56 (diff) | |
download | nova-c4c478dec76d5eb21b9cd3e8fe8e2f401872c848.tar.gz nova-c4c478dec76d5eb21b9cd3e8fe8e2f401872c848.tar.xz nova-c4c478dec76d5eb21b9cd3e8fe8e2f401872c848.zip |
Fixes Hyper-V live migration with attached volumes
Fixes bug: 1153429
The previous Hyper-V driver live migration implementation expects to find iSCSI
devices mounted on the same path on source and destination, which is not an
option in this context.
In order to be able to live migrate instances with attached volumes, this fix
provides the following behavior, based on the creation of a staged VM on the
target, so called "planned" in the Hyper-V documentation and in this patch.
pre_live_migration
The target host logs into the storage targets.
live_migration
The source host:
1) checks and removes a previously created planned VM for the current
instance if present on the target
2) creates a planned VM on the target by using the Hyper-V WMI API
3) maps the volume devices on the planned VM based on the target host
devices
4) live migrates the source VM on the planned VM
5) logs off the storage targets on the source
This solution provides live migration of volumes without needing to pause
the VM and detach / attach the volumes, preserving also the atomicity of the
live operation.
In the case in which no volumes are attached to the VM, live migration is
performed without creating explicitly a planned VM, starting from step 4
on the source in the above list.
Unit tests have been added for this scenario.
Change-Id: Ib634b77894f492896d86dce65a7269ece8f3d55b
Diffstat (limited to 'nova/utils.py')
0 files changed, 0 insertions, 0 deletions