ia64/xen-unstable

changeset 5865:c1c9a281eac2

Attached patch removes the empty domain if
xc.memory_increase_reservation fails.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
author kaf24@firebug.cl.cam.ac.uk
date Tue Jul 26 16:16:39 2005 +0000 (2005-07-26)
parents 9b436c6bf2bd
children 22984cc20ff9
files tools/python/xen/xend/image.py
line diff
     1.1 --- a/tools/python/xen/xend/image.py	Tue Jul 26 15:16:39 2005 +0000
     1.2 +++ b/tools/python/xen/xend/image.py	Tue Jul 26 16:16:39 2005 +0000
     1.3 @@ -130,7 +130,13 @@ class ImageHandler:
     1.4          # xc.domain_setuuid(dom, uuid)
     1.5          xc.domain_setcpuweight(dom, cpu_weight)
     1.6          xc.domain_setmaxmem(dom, mem_kb)
     1.7 -        xc.domain_memory_increase_reservation(dom, mem_kb)
     1.8 +
     1.9 +        try:
    1.10 +            xc.domain_memory_increase_reservation(dom, mem_kb)
    1.11 +        except:
    1.12 +            xc.domain_destroy(dom)
    1.13 +            raise
    1.14 +
    1.15          if cpu != -1:
    1.16              xc.domain_pincpu(dom, 0, 1<<int(cpu))
    1.17          return dom