[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH][VT] xm reboot for vmx domain
This patch make "xm reboot <domid>" be able to reboot vmx domain. In xm reboot process, control panel will wait until DomU notified hypervisor to set domain flag DOMFLAGS_SHUTDOWN. Unlike DomU, vmx domain run unmodified OS, so guest OS can not notified hypervisor. This patch adds the missing logic in control panel. Signed-off-by: Xu Dan <dan.d.xu@xxxxxxxxx > Yu Ke <ke.yu@xxxxxxxxx> diff -r 0240a69e1f97 tools/python/xen/xend/XendDomainInfo.py --- a/tools/python/xen/xend/XendDomainInfo.py Wed Oct 26 13:59:29 2005 +++ b/tools/python/xen/xend/XendDomainInfo.py Thu Oct 27 17:03:08 2005 @@ -680,6 +680,14 @@ """Get this domain's target memory size, in KiB.""" return self.info['memory_KiB'] + def vmx_get_xeninfo(self, xeninfo): + """Get vmx xeninfo""" + shutdown_reason = self.readDom('control/shutdown') + if shutdown_reason: + xeninfo['shutdown'] = 1 + for x in shutdown_reasons.keys(): + if shutdown_reasons[x] == shutdown_reason: + xeninfo['shutdown_reason'] = x def refreshShutdown(self, xeninfo = None): # If set at the end of this method, a restart is required, with the @@ -701,6 +709,10 @@ # machine. self.cleanupDomain() return + + if self.image: + if self.image.ostype == "vmx": + self.vmx_get_xeninfo(xeninfo) if xeninfo['dying']: # Dying means that a domain has been destroyed, but has not Attachment:
reboot1.patch _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |