diff --git a/nova/tests/unit/virt/hyperv/test_livemigrationops.py b/nova/tests/unit/virt/hyperv/test_livemigrationops.py index 88888ec7321f..de2431d31387 100644 --- a/nova/tests/unit/virt/hyperv/test_livemigrationops.py +++ b/nova/tests/unit/virt/hyperv/test_livemigrationops.py @@ -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) diff --git a/nova/virt/hyperv/livemigrationops.py b/nova/virt/hyperv/livemigrationops.py index 24f91b0f96be..0cb76e94cbb3 100644 --- a/nova/virt/hyperv/livemigrationops.py +++ b/nova/virt/hyperv/livemigrationops.py @@ -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 "