live migration: cpu doesn't have compatibility

Asked by Zhiyuan Zhou on 2012-09-11

I deployed ESSEX with two nodes, when I use live migration (nova live-migration instance_uuid targetHost ) , there will be error reported "cpu doesn't have compatibility".
I checked the target machine CPU do have less features (just two flags less) than source machine ; but both the two CPU is VT enabled, they just have 2 features differ.
If I migrate a instance from the feature-richer node to the other node, it works well.
This could be a possible problem of migration feature? the differences between these CPUs are actually not important for virtual machine running, nova should just check the required features but not CPU features exactly greater or equal ?

Question information

Language:
English Edit question
Status:
Solved
For:
OpenStack Compute (nova) Edit question
Assignee:
No assignee Edit question
Solved by:
Zhiyuan Zhou
Solved:
2012-09-24
Last query:
2012-09-24
Last reply:
Zhiyuan Zhou (zhyuan-zhou) said : #1

Looks libvirt can help caculate common set of CPU capabilities for a pool of host machines. But can anyone explain how to configure it (whether on libvirt on nova)?

Juan Caceres (juan-caceres) said : #2

Have you a solution for this problem Zhou i'm facing that problem too.

Juan Caceres (juan-caceres) said : #3

If you check the scheduler log its a Libvirt thing:

2012-09-18 09:48:26 TRACE nova.scheduler.driver raise result
2012-09-18 09:48:26 TRACE nova.scheduler.driver RemoteError: Remote error: InvalidCPUInfo Unacceptable CPU info: CPU doesn't have compatibility.
2012-09-18 09:48:26 TRACE nova.scheduler.driver
2012-09-18 09:48:26 TRACE nova.scheduler.driver 0
2012-09-18 09:48:26 TRACE nova.scheduler.driver
2012-09-18 09:48:26 TRACE nova.scheduler.driver Refer to http://libvirt.org/html/libvirt-libvirt.html#virCPUCompareResult

Some clue?

Zhiyuan Zhou (zhyuan-zhou) said : #4

Sorry for reply late. We end up modify the migration code , relax the CPU check logic.

You can find the code at nova/virt/libvirt/driver.py #check_can_live_migrate_destination

def check_can_live_migrate_destination(self, ctxt, instance_ref,
                                           block_migration=False,
       ....
        # Compare CPU
        src = instance_ref['host']
        source_cpu_info = self._get_compute_info(ctxt, src)['cpu_info']
        self._compare_cpu(source_cpu_info)

        # Create file on storage, to be checked on source host
        filename = self._create_shared_storage_test_file()

        return {"filename": filename, "block_migration": block_migration}

maying (breeze7086) said : #5

hello Zhiyuan Zhou
I'm facing the same problem with you , how did you fix it ?

welmessor (wei-m-gao) said : #6

Hi Zhou, according to what you replied on 9/24, i assumed that you referred to the Folsom version. I want to check with you that except the solution you took (modify the code), is there any other options avaliable ? thanks in advance!