ia64/xen-unstable

changeset 12088:4fd97b9aa31e

[XEND][XENAPI] XendCheckpoint should use XendConfig for passing configs.

Signed-off-by: Alastair Tse <atse@xensource.com>
author Alastair Tse <atse@xensource.com>
date Thu Oct 05 17:29:19 2006 +0100 (2006-10-05)
parents 116fc2e756d4
children a3788998952d
files tools/python/xen/xend/XendCheckpoint.py
line diff
     1.1 --- a/tools/python/xen/xend/XendCheckpoint.py	Thu Oct 05 17:29:19 2006 +0100
     1.2 +++ b/tools/python/xen/xend/XendCheckpoint.py	Thu Oct 05 17:29:19 2006 +0100
     1.3 @@ -109,7 +109,7 @@ def save(fd, dominfo, network, live, dst
     1.4          raise Exception, exn
     1.5  
     1.6  
     1.7 -def restore(xd, fd):
     1.8 +def restore(xd, fd, dominfo = None):
     1.9      signature = read_exact(fd, len(SIGNATURE),
    1.10          "not a valid guest state file: signature read")
    1.11      if signature != SIGNATURE:
    1.12 @@ -129,7 +129,11 @@ def restore(xd, fd):
    1.13  
    1.14      vmconfig = p.get_val()
    1.15  
    1.16 -    dominfo = xd.restore_(vmconfig)
    1.17 +    if dominfo:
    1.18 +        dominfo.update(XendConfig(sxp = vmconfig), refresh = False)
    1.19 +        dominfo.resume()
    1.20 +    else:
    1.21 +        dominfo = xd.restore_(vmconfig)
    1.22  
    1.23      store_port   = dominfo.getStorePort()
    1.24      console_port = dominfo.getConsolePort()