https://bugzilla.novell.com/show_bug.cgi?id=651822
https://bugzilla.novell.com/show_bug.cgi?id=651822#c18
--- Comment #18 from Dongyang Li 2010-12-06 10:39:08 UTC ---
ok, we should not save the snapshot name in the config.sxp so next time when xm
start a domU, we won't apply the formal snapshot again and again.
this should work for HVM guests, but, for PV guests and HVM guests with PV
driver, they are not so lucky and need something more to make the changes
correctly hit the backend file, I'm looking into it, Thanks
diff --git a/tools/python/xen/xend/XendDomain.py
b/tools/python/xen/xend/XendDomain.py
index ba27de7..a87a40c 100644
--- a/tools/python/xen/xend/XendDomain.py
+++ b/tools/python/xen/xend/XendDomain.py
@@ -320,11 +320,16 @@ class XendDomain:
fd, fn = tempfile.mkstemp()
f = os.fdopen(fd, 'w+b')
try:
+ snapshotname = ''
+ if dominfo.info.has_key('snapshotname'):
+ snapshotname = dominfo.info.pop('snapshotname')
+
prettyprint(dominfo.sxpr(legacy_only = False), f,
width = 78)
finally:
f.close()
-
+ if snapshotname:
+ dominfo.info['snapshotname'] = snapshotname
try:
shutil.move(fn, self._managed_config_path(dom_uuid))
except:
diff --git a/tools/python/xen/xend/server/blkif.py
b/tools/python/xen/xend/server/blkif.py
index 1e36bf9..de9d5e2 100644
--- a/tools/python/xen/xend/server/blkif.py
+++ b/tools/python/xen/xend/server/blkif.py
@@ -90,6 +90,7 @@ class BlkifController(DevController):
if 'snapshotname' in self.vm.info:
back['snapshot'] = self.vm.info['snapshotname']
+ self.vm.info.pop('snapshotname')
if security.on() == xsconstants.XS_POLICY_USE:
self.do_access_control(config, uname)
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.