[PATCH 2/2] qemu: Add some cpu hotpluggable inforamtion in vm xml when run "virsh setvcpus vm --count --config".

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <xiajidong@xxxxxxxxxxxxxxxxxxxx>
---
 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








[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux