mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
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>
This commit is contained in:
1 parent
c50a971459
commit
7dfa4a382a
1 file changed
+2
@@ -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)
|
||||
|
||||