]> 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)
committerCole Robinson <crobinso@redhat.com>
Thu, 14 Jun 2012 22:23:21 +0000 (18:23 -0400)
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.
(cherry picked from commit 87dfdb0b92f234a08408332095454260f1c86917)

src/lxc/lxc_driver.c

index 395fc8bded156a2590c4a6f3f33e4fa4b1212335..36dd1c512622e4edf3b7652e4d10c8f6b3c06689 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: