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:
Ewan Mellor committed 2007-02-26 15:41:35 +00:00
1 parent bb5e8c6299
commit d804137cf6
1 file changed
+3
+3
View File
@@ -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'])
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.