mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 18:21:39 +01:00
HVM vcpu add/remove: parse vcpu_avail to Qemu
Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com> Disable qemu cmdline option until our qemu supports it. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
This commit is contained in:
1 parent
cf75018188
commit
b8a087fb41
2 files changed
+4
No files matched your search
@@ -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:
|
||||
|
||||
@@ -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)
|
||||
|
||||