From: Keir Fraser Date: Mon, 14 Dec 2009 09:31:00 +0000 (+0000) Subject: HVM vcpu add/remove: parse vcpu_avail to Qemu X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~12902 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=b8a087fb41ba21847daaad7da615561b9ae36b3d;p=xen.git HVM vcpu add/remove: parse vcpu_avail to Qemu Signed-off-by: Liu, Jinsong Disable qemu cmdline option until our qemu supports it. Signed-off-by: Keir Fraser --- diff --git a/tools/python/xen/xend/XendDomainInfo.py b/tools/python/xen/xend/XendDomainInfo.py index d6e7f69f61..3e49951034 100644 --- a/tools/python/xen/xend/XendDomainInfo.py +++ b/tools/python/xen/xend/XendDomainInfo.py @@ -1903,6 +1903,9 @@ class XendDomainInfo: def getVCpuCount(self): return self.info['VCPUs_max'] + def getVCpuAvail(self): + return self.info['vcpu_avail'] + def setVCpuCount(self, vcpus): def vcpus_valid(n): if vcpus <= 0: diff --git a/tools/python/xen/xend/image.py b/tools/python/xen/xend/image.py index ee2e03375c..45d7a0815a 100644 --- a/tools/python/xen/xend/image.py +++ b/tools/python/xen/xend/image.py @@ -827,6 +827,7 @@ class HVMImageHandler(ImageHandler): def parseDeviceModelArgs(self, vmConfig): ret = ImageHandler.parseDeviceModelArgs(self, vmConfig) ret = ret + ['-vcpus', str(self.vm.getVCpuCount())] +# ret = ret + ['-vcpu_avail', str(self.vm.getVCpuAvail())] if self.kernel: log.debug("kernel = %s", self.kernel)