diff --git a/tools/python/xen/xend/XendCheckpoint.py b/tools/python/xen/xend/XendCheckpoint.py index 81d34b8f45..39616bd079 100644 --- a/tools/python/xen/xend/XendCheckpoint.py +++ b/tools/python/xen/xend/XendCheckpoint.py @@ -70,6 +70,8 @@ def save(xd, fd, dominfo, live): if l.rstrip() == "suspend": log.info("suspending %d" % dominfo.id) xd.domain_shutdown(dominfo.id, reason='suspend') + dominfo.state_wait("suspended") + log.info("suspend %d done" % dominfo.id) if dominfo.store_channel: try: dominfo.db.releaseDomain(dominfo.id) @@ -78,8 +80,6 @@ def save(xd, fd, dominfo, live): "error in domain release on xenstore: %s", ex) pass - dominfo.state_wait("suspended") - log.info("suspend %d done" % dominfo.id) child.tochild.write("done\n") child.tochild.flush() if filter(lambda (fd, event): event & select.POLLHUP, r):