ia64/xen-unstable

changeset 7013:11cca45a9a79

this patch fixes the bug that when "cpu" is not set in config file,
control panel complains "Error creating domain - int argument required".
Signed-off-by: Xin Li <xin.b.li@intel.com>
author emellor@ewan
date Thu Sep 22 11:09:11 2005 +0100 (2005-09-22)
parents 52eb8504be71
children 0f71667deb52
files tools/python/xen/xend/image.py
line diff
     1.1 --- a/tools/python/xen/xend/image.py	Thu Sep 22 11:04:30 2005 +0100
     1.2 +++ b/tools/python/xen/xend/image.py	Thu Sep 22 11:09:11 2005 +0100
     1.3 @@ -155,6 +155,8 @@ class ImageHandler:
     1.4          if dom <= 0:
     1.5              raise VmError('Creating domain failed: name=%s' %
     1.6                            self.vm.getName())
     1.7 +        if cpu is None:
     1.8 +            cpu = -1;
     1.9          log.debug("initDomain: cpu=%d mem_kb=%d ssidref=%d dom=%d", cpu, mem_kb, ssidref, dom)
    1.10          xc.domain_setcpuweight(dom, cpu_weight)
    1.11          xc.domain_setmaxmem(dom, mem_kb)