hi , I am confused by pinvcpu before migration. I have two physical machine. One has 12 CPUs (E5645 2*6 ) as src and the other has 8 CPUs (2*4) as des. Step 1 : VM is running on src host (E5645 2*6 CPUs) with its VCPUs pinned on some PCPUs Step 2 :Because PCPU count is different between src and des , I should pin VCPUs to all PCPUs . virsh vcpupin vmname 0 0-11 --config --live Step 3: Do migrate ,and it failed with error in des libvirt log "Unable to set cpuset.cpus: Invalid argument" I find that VM's cpu bitmap on src turns to <vcpupin vcpu='0' cpuset='0-11'/> . vm start fails on des due to its pin info cpuset='0-11' in vm->def. In usual case, after I pin VCPU to all PCPU, vcpupin info will be deleted in vm->def. -- qemuDomainPinVcpuFlags -- if (virBitmapIsAllSet(pcpumap, pCpuCount)) doReset = true; -- if (doReset) if (virDomainVcpuPinDel(vm->def, vcpu) < 0) I debug libvirt and find that on src which PCPU count is 12 (2*6) virBitmapIsAllSet(pcpumap, pCpuCount) return false pcpumap->max_bit is 16. pcpumap = virBitmapNewData(cpumap, maplen) --> bitmap = virBitmapNew(len * CHAR_BIT); //here len is 2. Although my physical machine only has 12 PCPUs , but here pcpumap->max_bit is len*CHAR_BIT . So bitmap is 0000 1111 1111 1111 ,and it's not ALL SET (ALL SET is 1111 1111 1111 1111). I tried to fix the bug in this case , but I have not found a good solution. Any suggestions will be thankful. Best Regards, -WangYufei -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list