Merge "Hyper-V: fix live migration with CSVs"

This commit is contained in:
Zuul 2017-12-01 01:38:59 +00:00 committed by Gerrit Code Review
commit e092acd02f
2 changed files with 8 additions and 4 deletions

View File

@ -118,8 +118,10 @@ class LiveMigrationOpsTestCase(test_base.HyperVBaseTestCase):
self.assertFalse(mock_copy_dvd_disk.called)
mock_live_migr = self._livemigrops._livemigrutils.live_migrate_vm
mock_live_migr.assert_called_once_with(mock_instance.name,
fake_dest)
mock_live_migr.assert_called_once_with(
mock_instance.name,
fake_dest,
migrate_disks=not shared_storage)
def test_live_migration(self):
self._test_live_migration(migrate_data_received=False)

View File

@ -73,8 +73,10 @@ class LiveMigrationOps(object):
self._pathutils.copy_vm_console_logs(instance_name, dest)
self._vmops.copy_vm_dvd_disks(instance_name, dest)
self._livemigrutils.live_migrate_vm(instance_name,
dest)
self._livemigrutils.live_migrate_vm(
instance_name,
dest,
migrate_disks=not shared_storage)
except Exception:
with excutils.save_and_reraise_exception():
LOG.debug("Calling live migration recover_method "