]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
qemu: fix set vcpus on host without NUMA
authorPavel Hrdina <phrdina@redhat.com>
Fri, 20 Mar 2015 14:01:53 +0000 (15:01 +0100)
committerPavel Hrdina <phrdina@redhat.com>
Tue, 24 Mar 2015 18:02:58 +0000 (19:02 +0100)
We don't have to modify cpuset.mems on hosts without NUMA.  It also
fixes an error message that you get instead of success if you trying
update vcpus of a guest on a host without NUMA.

error: internal error: NUMA isn't available on this host

Signer-off-by: Pavel Hrdina <phrdina@redhat.com>
src/qemu/qemu_driver.c

index 4279af865a6cd2aaed9be9c42799daa622ab8e5b..2c55fb0a8662659027c8c56c3d01baf3f0c1d933 100644 (file)
@@ -4890,7 +4890,8 @@ qemuDomainSetVcpusFlags(virDomainPtr dom, unsigned int nvcpus,
                                         &persistentDef) < 0)
         goto endjob;
 
-    if (flags & VIR_DOMAIN_AFFECT_LIVE && !(flags & VIR_DOMAIN_VCPU_GUEST)) {
+    if (flags & VIR_DOMAIN_AFFECT_LIVE && !(flags & VIR_DOMAIN_VCPU_GUEST) &&
+        virNumaIsAvailable()) {
         if (virCgroupNewEmulator(priv->cgroup, false, &cgroup_temp) < 0)
             goto endjob;