step1: hotplug vcpus step2: pin vcpus step3: unhotplug vcpus As a result, vcpu pin info still show up in xml. So we need clear it. Signed-off-by: Xu Yandong <xuyandong2@xxxxxxxxxx> --- src/qemu/qemu_hotplug.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 62e505b779..df94b54d09 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -6105,6 +6105,9 @@ qemuDomainHotplugDelVcpu(virQEMUDriverPtr driver, qemuDomainVcpuPersistOrder(vm->def); + virBitmapFree(vcpuinfo->cpumask); + vcpuinfo->cpumask = NULL; + if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm, driver->caps) < 0) goto cleanup; @@ -6390,6 +6393,8 @@ qemuDomainSetVcpusConfig(virDomainDefPtr def, vcpu->online = false; vcpu->hotpluggable = VIR_TRISTATE_BOOL_YES; + virBitmapFree(vcpu->cpumask); + vcpu->cpumask = NULL; if (--curvcpus == nvcpus) break; -- 2.18.1 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list