[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] Fix xm vcpu-set command for when wrong number of VCPU is given



# HG changeset patch
# User Ewan Mellor <ewan@xxxxxxxxxxxxx>
# Date 1172504495 0
# Node ID 0261e86db3b180e33767c923e65166f69941db86
# Parent  0b5da89e2b3dfb2c5c2e975cefbf24e6604edc19
Fix xm vcpu-set command for when wrong number of VCPU is given

Signed-off-by: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
---
 tools/python/xen/xend/XendDomainInfo.py |    3 +++
 1 files changed, 3 insertions(+)

diff -r 0b5da89e2b3d -r 0261e86db3b1 tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   Mon Feb 26 15:39:34 2007 +0000
+++ b/tools/python/xen/xend/XendDomainInfo.py   Mon Feb 26 15:41:35 2007 +0000
@@ -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'])

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.