when run "virsh setvcpus vm --count <current> --config", and
destroy vm, then start vm, it can display cpu hotpluggable information
when run "virsh dumpxml vm | grep vcpu". so we can know the value
of enabled and hotpluggable attributes of the current vcpus.

Signed-off-by: Jidong Xia <[email protected]>
---
 src/qemu/qemu_hotplug.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index c574f63..312f257 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -6274,8 +6274,10 @@ qemuDomainSetVcpusConfig(virDomainDefPtr def,
     /* ordering information may become invalid, thus clear it */
     virDomainDefVcpuOrderClear(def);

-    if (curvcpus == nvcpus)
+    if (curvcpus == nvcpus) {
+        def->individualvcpus = true;
         return;
+    }

     if (curvcpus < nvcpus) {
         for (i = 0; i < maxvcpus; i++) {
--
1.8.3.1




Reply via email to