mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
Clear "/control/shutdown" node on domain restore.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
This commit is contained in:
1 parent
9c07496f46
commit
6b2e541096
1 file changed
+6
@@ -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;
|
||||
|
||||