ia64/xen-unstable

changeset 6223:27a4a073fc75

Clear "/control/shutdown" node on domain restore.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
author cl349@firebug.cl.cam.ac.uk
date Wed Aug 17 10:18:13 2005 +0000 (2005-08-17)
parents 698a7dc797e4
children 8203b7d536d3
files tools/python/xen/xend/XendDomainInfo.py
line diff
     1.1 --- a/tools/python/xen/xend/XendDomainInfo.py	Wed Aug 17 09:59:04 2005 +0000
     1.2 +++ b/tools/python/xen/xend/XendDomainInfo.py	Wed Aug 17 10:18:13 2005 +0000
     1.3 @@ -208,6 +208,7 @@ class XendDomainInfo:
     1.4          log.debug('restoring with ssidref='+str(ssidref))
     1.5          id = xc.domain_create(ssidref = ssidref)
     1.6          vm.setdom(id)
     1.7 +        vm.clear_shutdown()
     1.8          try:
     1.9              vm.restore = True
    1.10              vm.construct(config)
    1.11 @@ -979,6 +980,11 @@ class XendDomainInfo:
    1.12          if not reason in ['suspend']:
    1.13              self.shutdown_pending = {'start':time.time(), 'reason':reason}
    1.14  
    1.15 +    def clear_shutdown(self):
    1.16 +        db = self.db.addChild("/control")
    1.17 +        db['shutdown'] = ""
    1.18 +        db.saveDB(save=True)
    1.19 +
    1.20      def send_sysrq(self, key=0):
    1.21          db = self.db.addChild("/control");
    1.22          db['sysrq'] = '%c' % key;