diff --git a/nova/conductor/tasks/live_migrate.py b/nova/conductor/tasks/live_migrate.py index 9652b44bfd0b..99ee54f14e55 100644 --- a/nova/conductor/tasks/live_migrate.py +++ b/nova/conductor/tasks/live_migrate.py @@ -163,7 +163,10 @@ class LiveMigrationTask(base.TaskBase): # HyperV's vNUMA feature doesn't allow specific pinning hypervisor_type = objects.ComputeNode.get_by_host_and_nodename( self.context, self.source, self.instance.node).hypervisor_type - if hypervisor_type != obj_fields.HVType.KVM: + + # KVM is not a hypervisor, so when using a virt_type of "kvm" the + # hypervisor_type will still be "QEMU". + if hypervisor_type.lower() != obj_fields.HVType.QEMU: return msg = ('Instance has an associated NUMA topology. ' diff --git a/nova/tests/unit/conductor/tasks/test_live_migrate.py b/nova/tests/unit/conductor/tasks/test_live_migrate.py index 13a4b380d0d2..cf1097902dc4 100644 --- a/nova/tests/unit/conductor/tasks/test_live_migrate.py +++ b/nova/tests/unit/conductor/tasks/test_live_migrate.py @@ -221,7 +221,7 @@ class LiveMigrationTaskTestCase(test.NoDBTestCase): def test_check_instance_has_no_numa_fails(self, mock_get): self.flags(enable_numa_live_migration=False, group='workarounds') mock_get.return_value = objects.ComputeNode( - uuid=uuids.cn1, hypervisor_type='kvm') + uuid=uuids.cn1, hypervisor_type='QEMU') self.task.instance.numa_topology = objects.InstanceNUMATopology( cells=[objects.InstanceNUMACell(id=0, cpuset=set([0]), memory=1024)])