# HG changeset patch # User emellor@ewan # Date 1127383751 -3600 # Node ID 11cca45a9a7972d937b3c04fc432733cd218363d # Parent 52eb8504be717c1ee7371234696bf8fa45b2aea6 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 diff -r 52eb8504be71 -r 11cca45a9a79 tools/python/xen/xend/image.py --- a/tools/python/xen/xend/image.py Thu Sep 22 11:04:30 2005 +0100 +++ b/tools/python/xen/xend/image.py Thu Sep 22 11:09:11 2005 +0100 @@ -155,6 +155,8 @@ class ImageHandler: if dom <= 0: raise VmError('Creating domain failed: name=%s' % self.vm.getName()) + if cpu is None: + cpu = -1; log.debug("initDomain: cpu=%d mem_kb=%d ssidref=%d dom=%d", cpu, mem_kb, ssidref, dom) xc.domain_setcpuweight(dom, cpu_weight) xc.domain_setmaxmem(dom, mem_kb)