mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 18:21:39 +01:00
[XEND][XENAPI] XendCheckpoint should use XendConfig for passing configs.
Signed-off-by: Alastair Tse <atse@xensource.com>
This commit is contained in:
1 parent
8eb29e99bd
commit
02af4f3cd3
1 file changed
+6
-2
@@ -109,7 +109,7 @@ def save(fd, dominfo, network, live, dst):
|
||||
raise Exception, exn
|
||||
|
||||
|
||||
def restore(xd, fd):
|
||||
def restore(xd, fd, dominfo = None):
|
||||
signature = read_exact(fd, len(SIGNATURE),
|
||||
"not a valid guest state file: signature read")
|
||||
if signature != SIGNATURE:
|
||||
@@ -129,7 +129,11 @@ def restore(xd, fd):
|
||||
|
||||
vmconfig = p.get_val()
|
||||
|
||||
dominfo = xd.restore_(vmconfig)
|
||||
if dominfo:
|
||||
dominfo.update(XendConfig(sxp = vmconfig), refresh = False)
|
||||
dominfo.resume()
|
||||
else:
|
||||
dominfo = xd.restore_(vmconfig)
|
||||
|
||||
store_port = dominfo.getStorePort()
|
||||
console_port = dominfo.getConsolePort()
|
||||
|
||||