ia64/xen-unstable

changeset 19223:634b425cafa3

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>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Feb 17 11:13:34 2009 +0000 (2009-02-17)
parents 34812acece03
children a35dffe6f1b6
files tools/python/xen/xend/XendConfig.py
line diff
     1.1 --- a/tools/python/xen/xend/XendConfig.py	Tue Feb 17 11:12:50 2009 +0000
     1.2 +++ b/tools/python/xen/xend/XendConfig.py	Tue Feb 17 11:13:34 2009 +0000
     1.3 @@ -431,6 +431,8 @@ class XendConfig(dict):
     1.4      def _vcpus_sanity_check(self):
     1.5          if 'VCPUs_max' in self and 'vcpu_avail' not in self:
     1.6              self['vcpu_avail'] = (1 << self['VCPUs_max']) - 1
     1.7 +        if 'online_vcpus' in self:
     1.8 +            self['VCPUs_live'] = self['online_vcpus']
     1.9  
    1.10      def _uuid_sanity_check(self):
    1.11          """Make sure UUID is in proper string format with hyphens."""