aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2009-02-17 11:13:34 +0000
committerKeir Fraser <keir.fraser@citrix.com>2009-02-17 11:13:34 +0000
commitae4aa4f8030d63720eb0c9db63a2a53dbdddfa1b (patch)
treea4979bd2d9b50191962eed39306e794bc26cfda7 /tools
parentec54fc8c6db34e43d9a0f1f4eaa62c68861d8b9f (diff)
downloadxen-ae4aa4f8030d63720eb0c9db63a2a53dbdddfa1b.tar.gz
xen-ae4aa4f8030d63720eb0c9db63a2a53dbdddfa1b.tar.bz2
xen-ae4aa4f8030d63720eb0c9db63a2a53dbdddfa1b.zip
xend: Update VCPUs_live
XendConfig.py said about VCPUs_live as follows. -- the number of VCPUs currently up, as reported by Xen. But the value of VCPUs_live always is 1 till xm vcpu-set get executed. This patch updates VCPUs_live by using online_vcpus. Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/python/xen/xend/XendConfig.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/python/xen/xend/XendConfig.py b/tools/python/xen/xend/XendConfig.py
index 2d2138559b..5bdf02804a 100644
--- a/tools/python/xen/xend/XendConfig.py
+++ b/tools/python/xen/xend/XendConfig.py
@@ -431,6 +431,8 @@ class XendConfig(dict):
def _vcpus_sanity_check(self):
if 'VCPUs_max' in self and 'vcpu_avail' not in self:
self['vcpu_avail'] = (1 << self['VCPUs_max']) - 1
+ if 'online_vcpus' in self:
+ self['VCPUs_live'] = self['online_vcpus']
def _uuid_sanity_check(self):
"""Make sure UUID is in proper string format with hyphens."""