direct-io.hg

changeset 13777:1fb0302683d3

Fix handling of HVM boot.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
author Ewan Mellor <ewan@xensource.com>
date Thu Feb 01 15:32:16 2007 +0000 (2007-02-01)
parents 2b4b07391df2
children f84ba62ca615
files tools/python/xen/xend/XendConfig.py
line diff
     1.1 --- a/tools/python/xen/xend/XendConfig.py	Thu Feb 01 15:31:34 2007 +0000
     1.2 +++ b/tools/python/xen/xend/XendConfig.py	Thu Feb 01 15:32:16 2007 +0000
     1.3 @@ -125,8 +125,7 @@ XENAPI_HVM_CFG = {
     1.4      'platform_std_vga': 'stdvga',
     1.5      'platform_serial' : 'serial',
     1.6      'platform_localtime': 'localtime',
     1.7 -    'platform_keymap' : 'keymap',
     1.8 -    'HVM_boot': 'boot',
     1.9 +    'platform_keymap' : 'keymap'
    1.10  }    
    1.11  
    1.12  # List of XendConfig configuration keys that have no direct equivalent
    1.13 @@ -735,6 +734,7 @@ class XendConfig(dict):
    1.14                  val = sxp.child_value(image_sxp, imgkey, None)
    1.15                  if val != None:
    1.16                      self[apikey] = val
    1.17 +            self._hvm_boot_params_from_sxp(image_sxp)
    1.18  
    1.19          # extract backend value
    1.20                      
    1.21 @@ -1372,12 +1372,19 @@ class XendConfig(dict):
    1.22              val = sxp.child_value(image_sxp, imgkey, None)
    1.23              if val != None:
    1.24                  type_conv = XENAPI_CFG_TYPES[apikey]
    1.25 -                if callable(conv):
    1.26 +                if callable(type_conv):
    1.27                      self[apikey] = type_conv(val)
    1.28                  else:
    1.29                      self[apikey] = val
    1.30 +        self._hvm_boot_params_from_sxp(image_sxp)
    1.31  
    1.32  
    1.33 +    def _hvm_boot_params_from_sxp(self, image_sxp):
    1.34 +        boot = sxp.child_value(image_sxp, 'boot', None)
    1.35 +        if boot is not None:
    1.36 +            self['HVM_boot_policy'] = 'BIOS order'
    1.37 +            self['HVM_boot_params'] = { 'order' : boot }
    1.38 +
    1.39  
    1.40  #
    1.41  # debugging