# HG changeset patch
# User Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>
# Date 1187020031 -3600
# Node ID d8b5b02c52cf997eaa9be4717dd2da1a8a1cb4d2
# Parent 01c721fddb907e1d1869b081779b1dc23041a86d
[HVM] [TOOLS] Move device state save earlier in suspend path
Signed-off-by: Zhai Edwin <edwin.zhai@xxxxxxxxx>
---
tools/python/xen/xend/XendCheckpoint.py | 3 +++
tools/python/xen/xend/XendDomainInfo.py | 2 --
2 files changed, 3 insertions(+), 2 deletions(-)
diff -r 01c721fddb90 -r d8b5b02c52cf tools/python/xen/xend/XendCheckpoint.py
--- a/tools/python/xen/xend/XendCheckpoint.py Mon Aug 13 16:41:04 2007 +0100
+++ b/tools/python/xen/xend/XendCheckpoint.py Mon Aug 13 16:47:11 2007 +0100
@@ -98,6 +98,9 @@ def save(fd, dominfo, network, live, dst
log.info("Domain %d suspended.", dominfo.getDomid())
dominfo.migrateDevices(network, dst, DEV_MIGRATE_STEP3,
domain_name)
+ if hvm:
+ dominfo.image.saveDeviceModel()
+
tochild.write("done\n")
tochild.flush()
log.debug('Written done')
diff -r 01c721fddb90 -r d8b5b02c52cf tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py Mon Aug 13 16:41:04 2007 +0100
+++ b/tools/python/xen/xend/XendDomainInfo.py Mon Aug 13 16:47:11 2007 +0100
@@ -1184,8 +1184,6 @@ class XendDomainInfo:
self._clearRestart()
if reason == 'suspend':
- if self._stateGet() != DOM_STATE_SUSPENDED:
- self.image.saveDeviceModel()
self._stateSet(DOM_STATE_SUSPENDED)
# Don't destroy the domain. XendCheckpoint will do
# this once it has finished. However, stop watching
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|