aboutsummaryrefslogtreecommitdiffstats
path: root/tools/examples/xc_dom_control.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/examples/xc_dom_control.py')
-rwxr-xr-xtools/examples/xc_dom_control.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/examples/xc_dom_control.py b/tools/examples/xc_dom_control.py
index ea97a45f0e..4f0bd5de52 100755
--- a/tools/examples/xc_dom_control.py
+++ b/tools/examples/xc_dom_control.py
@@ -137,6 +137,10 @@ elif cmd == 'suspend':
os.kill(pid, signal.SIGTERM)
xc.domain_stop( dom=dom )
+
+ while not xc.domain_getinfo( first_dom=dom, max_doms=1 )[0]['stopped']:
+ time.sleep(0.1);
+
rc = xc.linux_save( dom=dom, state_file=file, progress=1)
if rc == 0 : xc.domain_destroy( dom=dom, force=1 )