mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 02:30:03 +01:00
Fix xm vcpu-set command for when wrong number of VCPU is given
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
This commit is contained in:
1 parent
bb5e8c6299
commit
d804137cf6
1 file changed
+3
@@ -938,6 +938,9 @@ class XendDomainInfo:
|
||||
return self.info['vcpus_number']
|
||||
|
||||
def setVCpuCount(self, vcpus):
|
||||
if vcpus <= 0:
|
||||
raise XendError('Invalid VCPUs')
|
||||
|
||||
self.info['vcpu_avail'] = (1 << vcpus) - 1
|
||||
if self.domid >= 0:
|
||||
self.storeVm('vcpu_avail', self.info['vcpu_avail'])
|
||||
|
||||