From: Martin Kletzander Date: Tue, 29 May 2012 07:12:32 +0000 (+0200) Subject: lxc: return correct number of CPUs X-Git-Tag: v0.9.11.4~45 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0089a2058f290828668d9efb1ecd825c130c74d4;p=thirdparty%2Flibvirt.git lxc: return correct number of CPUs 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) --- diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c index 395fc8bded..36dd1c5126 100644 --- a/src/lxc/lxc_driver.c +++ b/src/lxc/lxc_driver.c @@ -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: