# HG changeset patch
# User Ewan Mellor <ewan@xxxxxxxxxxxxx>
# Date 1170343936 0
# Node ID 1fb0302683d34317d363f5e7b627fb432f1ac19e
# Parent 2b4b07391df2d63dc419701099b04f8a0c202111
Fix handling of HVM boot.
Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>
---
tools/python/xen/xend/XendConfig.py | 15 +++++++++++----
1 files changed, 11 insertions(+), 4 deletions(-)
diff -r 2b4b07391df2 -r 1fb0302683d3 tools/python/xen/xend/XendConfig.py
--- a/tools/python/xen/xend/XendConfig.py Thu Feb 01 15:31:34 2007 +0000
+++ b/tools/python/xen/xend/XendConfig.py Thu Feb 01 15:32:16 2007 +0000
@@ -125,8 +125,7 @@ XENAPI_HVM_CFG = {
'platform_std_vga': 'stdvga',
'platform_serial' : 'serial',
'platform_localtime': 'localtime',
- 'platform_keymap' : 'keymap',
- 'HVM_boot': 'boot',
+ 'platform_keymap' : 'keymap'
}
# List of XendConfig configuration keys that have no direct equivalent
@@ -735,6 +734,7 @@ class XendConfig(dict):
val = sxp.child_value(image_sxp, imgkey, None)
if val != None:
self[apikey] = val
+ self._hvm_boot_params_from_sxp(image_sxp)
# extract backend value
@@ -1372,11 +1372,18 @@ class XendConfig(dict):
val = sxp.child_value(image_sxp, imgkey, None)
if val != None:
type_conv = XENAPI_CFG_TYPES[apikey]
- if callable(conv):
+ if callable(type_conv):
self[apikey] = type_conv(val)
else:
self[apikey] = val
-
+ self._hvm_boot_params_from_sxp(image_sxp)
+
+
+ def _hvm_boot_params_from_sxp(self, image_sxp):
+ boot = sxp.child_value(image_sxp, 'boot', None)
+ if boot is not None:
+ self['HVM_boot_policy'] = 'BIOS order'
+ self['HVM_boot_params'] = { 'order' : boot }
#
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|