mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
Record the last shutdown reason for each VM in the store.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
This commit is contained in:
1 parent
79a9f1f484
commit
8787be2922
2 files changed
+3
No files matched your search
@@ -80,6 +80,7 @@ ZOMBIE_PREFIX = 'Zombie-'
|
||||
MINIMUM_RESTART_TIME = 20
|
||||
|
||||
RESTART_IN_PROGRESS = 'xend/restart_in_progress'
|
||||
LAST_SHUTDOWN_REASON = 'xend/last_shutdown_reason'
|
||||
|
||||
#
|
||||
# Device migration stages (eg. XendDomainInfo, XendCheckpoint, server.tpmif)
|
||||
|
||||
@@ -969,6 +969,7 @@ class XendDomainInfo:
|
||||
|
||||
log.warn('Domain has crashed: name=%s id=%d.',
|
||||
self.info['name_label'], self.domid)
|
||||
self._writeVm(LAST_SHUTDOWN_REASON, 'crash')
|
||||
|
||||
if xroot.get_enable_dump():
|
||||
self.dumpCore()
|
||||
@@ -988,6 +989,7 @@ class XendDomainInfo:
|
||||
|
||||
log.info('Domain has shutdown: name=%s id=%d reason=%s.',
|
||||
self.info['name_label'], self.domid, reason)
|
||||
self._writeVm(LAST_SHUTDOWN_REASON, reason)
|
||||
|
||||
self._clearRestart()
|
||||
|
||||
|
||||