diff options
author | cl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk> | 2005-08-17 10:18:13 +0000 |
---|---|---|
committer | cl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk> | 2005-08-17 10:18:13 +0000 |
commit | 6b2e5410964d72f8ee8b99e268f2c8b90bac7751 (patch) | |
tree | a77033d96509efef6fa991a24484c059fbb12071 | |
parent | 9c07496f46ea70780cfee6a7ba5094692d4757cb (diff) | |
download | xen-6b2e5410964d72f8ee8b99e268f2c8b90bac7751.tar.gz xen-6b2e5410964d72f8ee8b99e268f2c8b90bac7751.tar.bz2 xen-6b2e5410964d72f8ee8b99e268f2c8b90bac7751.zip |
Clear "/control/shutdown" node on domain restore.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
-rw-r--r-- | tools/python/xen/xend/XendDomainInfo.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/python/xen/xend/XendDomainInfo.py b/tools/python/xen/xend/XendDomainInfo.py index 7e0c07ab53..570bb6dbda 100644 --- a/tools/python/xen/xend/XendDomainInfo.py +++ b/tools/python/xen/xend/XendDomainInfo.py @@ -208,6 +208,7 @@ class XendDomainInfo: log.debug('restoring with ssidref='+str(ssidref)) id = xc.domain_create(ssidref = ssidref) vm.setdom(id) + vm.clear_shutdown() try: vm.restore = True vm.construct(config) @@ -979,6 +980,11 @@ class XendDomainInfo: if not reason in ['suspend']: self.shutdown_pending = {'start':time.time(), 'reason':reason} + def clear_shutdown(self): + db = self.db.addChild("/control") + db['shutdown'] = "" + db.saveDB(save=True) + def send_sysrq(self, key=0): db = self.db.addChild("/control"); db['sysrq'] = '%c' % key; |