WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] Don't lose the image settings when reboot

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Don't lose the image settings when rebooting domains. This fixes recent HVM
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 02 Jan 2007 06:40:06 -0800
Delivery-date: Tue, 02 Jan 2007 06:40:02 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Ewan Mellor <ewan@xxxxxxxxxxxxx>
# Date 1167743041 0
# Node ID 7cd6c032689eca5509a1b8cffaaa50b3f45f5765
# Parent  711c31232d71608fe4ea9f4f22ca2620d3faf8ff
Don't lose the image settings when rebooting domains.  This fixes recent HVM
reboot problems -- we were passing 0 to shadow_mem_control, because Xend was
treating the domain as PV.

Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>
---
 tools/python/xen/xend/XendConfig.py |   19 +++++++++++--------
 1 files changed, 11 insertions(+), 8 deletions(-)

diff -r 711c31232d71 -r 7cd6c032689e tools/python/xen/xend/XendConfig.py
--- a/tools/python/xen/xend/XendConfig.py       Tue Jan 02 10:57:50 2007 +0000
+++ b/tools/python/xen/xend/XendConfig.py       Tue Jan 02 13:04:01 2007 +0000
@@ -299,7 +299,7 @@ class XendConfig(dict):
             self._sxp_to_xapi_unsupported(sxp_obj)
         elif xapi:
             self.update_with_xenapi_config(xapi)
-            self._add_xapi_unsupported()
+            self._add_xapi_unsupported(xapi)
         elif dominfo:
             # output from xc.domain_getinfo
             self._dominfo_to_xapi(dominfo)
@@ -728,19 +728,22 @@ class XendConfig(dict):
         _set_cfg_if_exists('up_time')
         _set_cfg_if_exists('status') # TODO, deprecated  
 
-    def _add_xapi_unsupported(self):
+    def _add_xapi_unsupported(self, xapi_dict):
         """Updates the configuration object with entries that are not
         officially supported by the Xen API but is required for
         the rest of Xend to function.
         """
 
         # populate image
-        hvm = self['HVM_boot'] != ''
-        self['image']['type'] = hvm and 'hvm' or 'linux'
-        if hvm:
-            self['image']['hvm'] = {}
-            for xapi, cfgapi in XENAPI_HVM_CFG.items():
-                self['image']['hvm'][cfgapi] = self[xapi]
+        if 'image' in xapi_dict:
+            self['image'].update(xapi_dict['image'])
+        else:
+            hvm = self['HVM_boot'] != ''
+            self['image']['type'] = hvm and 'hvm' or 'linux'
+            if hvm:
+                self['image']['hvm'] = {}
+                for xapi, cfgapi in XENAPI_HVM_CFG.items():
+                    self['image']['hvm'][cfgapi] = self[xapi]
             
 
     def _get_old_state_string(self):

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Don't lose the image settings when rebooting domains. This fixes recent HVM, Xen patchbot-unstable <=