]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
lxc: return correct number of CPUs
authorMartin Kletzander <mkletzan@redhat.com>
Tue, 29 May 2012 07:12:32 +0000 (09:12 +0200)
committerMartin Kletzander <mkletzan@redhat.com>
Wed, 30 May 2012 10:51:44 +0000 (12:51 +0200)
When getting number of CPUs the host has assigned, there was always
number "1" returned. Even though all lxc domains with no pinning
launched by libvirt run on all pCPUs (by default, no matter what's the
number), we should at least return the same number as the user
specified when creating the domain.

src/lxc/lxc_driver.c

index 9aea5560c700a556c5d84042ecf70cc6e0fb40e3..919f4abeeb1b6ced63a92e6d3a57a14316709a41 100644 (file)
@@ -590,7 +590,7 @@ static int lxcDomainGetInfo(virDomainPtr dom,
     }
 
     info->maxMem = vm->def->mem.max_balloon;
-    info->nrVirtCpu = 1;
+    info->nrVirtCpu = vm->def->vcpus;
     ret = 0;
 
 cleanup: