ia64/xen-unstable

changeset 18196:4160bc28f0fb

xm: Enable a bootloader when using XM via Xen-API

This enables the usage of a bootloader, i.e., pygrub, when starting a
domain using xm in Xen-API mode.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
author Keir Fraser <keir.fraser@citrix.com>
date Wed Jul 30 09:22:24 2008 +0100 (2008-07-30)
parents b613bf4c4289
children bd9823ec7097
files tools/python/xen/xm/xenapi_create.py
line diff
     1.1 --- a/tools/python/xen/xm/xenapi_create.py	Wed Jul 30 09:20:42 2008 +0100
     1.2 +++ b/tools/python/xen/xm/xenapi_create.py	Wed Jul 30 09:22:24 2008 +0100
     1.3 @@ -389,7 +389,7 @@ class xenapi_create:
     1.4              "device":
     1.5                  vbd.attributes["device"].value,
     1.6              "bootable":
     1.7 -                vbd.attributes["bootable"].value == "True",
     1.8 +                vbd.attributes["bootable"].value == "1",
     1.9              "mode":
    1.10                  vbd.attributes["mode"].value,
    1.11              "type":
    1.12 @@ -597,13 +597,15 @@ class sxp2xml:
    1.13              pv = document.createElement("pv")
    1.14              pv.attributes["kernel"] \
    1.15                  = get_child_by_name(image, "kernel", "")
    1.16 -            pv.attributes["bootloader"] = ""
    1.17 +            pv.attributes["bootloader"] \
    1.18 +                = get_child_by_name(config, "bootloader", "")
    1.19              pv.attributes["ramdisk"] \
    1.20                  = get_child_by_name(image, "ramdisk", "")
    1.21              pv.attributes["args"] \
    1.22                  = "root=" + get_child_by_name(image, "root", "") \
    1.23                  + " " + get_child_by_name(image, "args", "")
    1.24 -            pv.attributes["bootloader_args"] = ""
    1.25 +            pv.attributes["bootloader_args"] \
    1.26 +                = get_child_by_name(config, "bootloader_args","")
    1.27  
    1.28              vm.appendChild(pv)
    1.29          elif image[0] == "hvm":