mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
[XEND/XM] Improve error reporting in 'xm restore'.
From: Mats Petersson <Mats.Petersson@amd.com> Signed-off-by: Keir Fraser <keir@xensource.com>
This commit is contained in:
1 parent
cc32978664
commit
2320487314
2 files changed
+10
-4
No files matched your search
@@ -1088,6 +1088,9 @@ class XendDomain:
|
||||
|
||||
try:
|
||||
return XendCheckpoint.restore(self, fd, paused=paused)
|
||||
except XendError, e:
|
||||
log.exception("Restore failed")
|
||||
raise
|
||||
except:
|
||||
# I don't really want to log this exception here, but the error
|
||||
# handling in the relocation-socket handling code (relocate.py) is
|
||||
|
||||
@@ -732,10 +732,13 @@ def xm_restore(args):
|
||||
err("xm restore: Unable to read file %s" % savefile)
|
||||
sys.exit(1)
|
||||
|
||||
if serverType == SERVER_XEN_API:
|
||||
server.xenapi.VM.restore(savefile, paused)
|
||||
else:
|
||||
server.xend.domain.restore(savefile, paused)
|
||||
try:
|
||||
if serverType == SERVER_XEN_API:
|
||||
server.xenapi.VM.restore(savefile, paused)
|
||||
else:
|
||||
server.xend.domain.restore(savefile, paused)
|
||||
except Exception, ex:
|
||||
err("%s" % ex.faultString)
|
||||
|
||||
|
||||
def datetime_to_secs(v):
|
||||
|
||||