Enable a bootloader when using XM via Xen-API
PATCH 1/1 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.
xen-unstable.hg/tools/python/xen/xm/xenapi_create.py +5 -3
@@ -389,7 +389,7 @@ class xenapi_create: "device": vbd.attributes["device"].value, "bootable": - vbd.attributes["bootable"].value == "True", + vbd.attributes["bootable"].value == "1", "mode": vbd.attributes["mode"].value, "type":
@@ -597,13 +597,15 @@ class sxp2xml: pv = document.createElement("pv") pv.attributes["kernel"] \ = get_child_by_name(image, "kernel", "") - pv.attributes["bootloader"] = "" + pv.attributes["bootloader"] \ + = get_child_by_name(config, "bootloader", "") pv.attributes["ramdisk"] \ = get_child_by_name(image, "ramdisk", "") pv.attributes["args"] \ = "root=" + get_child_by_name(image, "root", "") \ + " " + get_child_by_name(image, "args", "") - pv.attributes["bootloader_args"] = "" + pv.attributes["bootloader_args"] \ + = get_child_by_name(config, "bootloader_args","") vm.appendChild(pv) elif image[0] == "hvm":
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 2 lines · Stefan Berger
This enables the usage of a bootloader, i.e., pygrub, when starting a domain using xm in Xen-API mode.
It's supposed to default to using pygrub if no kernel is specified, is this still true after your change?
regards
john
Quoted 9 lines
John Levon <[email protected]>
Sent by: [email protected]07/29/2008 10:45 PM
To
Stefan Berger/Watson/IBM@IBMUS
Quoted 7 lines
cc
xen-devel <[email protected]>
Subject
Re: [Xen-devel] [PATCH] [XM] Enable a bootloader when using XM via
Xen-API
Quoted 11 lines · Stefan Berger
Quoted 3 lines
This enables the usage of a bootloader, i.e., pygrub, when starting a domain using xm in Xen-API mode.
It's supposed to default to using pygrub if no kernel is specified, is this still true after your change?
regards
john
I don't think it actually worked correctly before with xm.
Using a vm config file with the following entries and the domU kernel as the first title in grub.conf
name = "test"
memory = 512
disk = ['file:/temp/fc8-i386.img,sda,w']
bootloader = "/usr/bin/pygrub"
I tested using 'xm create' in Xen-API mode by enabling and disabling the 'bootloader' line and got this here:
- without the patch and the bootloader line 'on' : 'Internal Error: Had
a bootloader specified, but no disks are bootable'
- without the patch and the bootloader line 'off': 'Internal Error: Had
a bootloader specified, but no disks are bootable'
- with the patch and the bootloader line 'on' : * boots domU * - with the patch and the bootloader line 'off': * boots domU *
I think the patch solves the problem with the bootloader.
Is it possible to have pygrub display its GUI while doing 'xm create'? How?
Stefan
Quoted 5 lines
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel