diff options
author | Tim Deegan <Tim.Deegan@xensource.com> | 2007-08-13 16:47:11 +0100 |
---|---|---|
committer | Tim Deegan <Tim.Deegan@xensource.com> | 2007-08-13 16:47:11 +0100 |
commit | 870e806e0d8b546e5893a14c260144b18bf833f0 (patch) | |
tree | a26c5ad3400460812d6deda82d5d218fcaaf0ca4 /tools | |
parent | 74a665b5eea1e0987118f848af558acea46623f5 (diff) | |
download | xen-870e806e0d8b546e5893a14c260144b18bf833f0.tar.gz xen-870e806e0d8b546e5893a14c260144b18bf833f0.tar.bz2 xen-870e806e0d8b546e5893a14c260144b18bf833f0.zip |
[HVM] [TOOLS] Move device state save earlier in suspend path
Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/python/xen/xend/XendCheckpoint.py | 3 | ||||
-rw-r--r-- | tools/python/xen/xend/XendDomainInfo.py | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/tools/python/xen/xend/XendCheckpoint.py b/tools/python/xen/xend/XendCheckpoint.py index 47b4cfba13..f88d8a8788 100644 --- a/tools/python/xen/xend/XendCheckpoint.py +++ b/tools/python/xen/xend/XendCheckpoint.py @@ -98,6 +98,9 @@ def save(fd, dominfo, network, live, dst, checkpoint=False): 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 --git a/tools/python/xen/xend/XendDomainInfo.py b/tools/python/xen/xend/XendDomainInfo.py index b3542ff1b8..3ca3f506d0 100644 --- a/tools/python/xen/xend/XendDomainInfo.py +++ b/tools/python/xen/xend/XendDomainInfo.py @@ -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 |