mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
Attached patch removes the empty domain if
xc.memory_increase_reservation fails. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
1 parent
71ae53ce26
commit
bd16e616b6
1 file changed
+7
-1
@@ -130,7 +130,13 @@ class ImageHandler:
|
||||
# xc.domain_setuuid(dom, uuid)
|
||||
xc.domain_setcpuweight(dom, cpu_weight)
|
||||
xc.domain_setmaxmem(dom, mem_kb)
|
||||
xc.domain_memory_increase_reservation(dom, mem_kb)
|
||||
|
||||
try:
|
||||
xc.domain_memory_increase_reservation(dom, mem_kb)
|
||||
except:
|
||||
xc.domain_destroy(dom)
|
||||
raise
|
||||
|
||||
if cpu != -1:
|
||||
xc.domain_pincpu(dom, 0, 1<<int(cpu))
|
||||
return dom
|
||||
|
||||