From: Stefan Berger Subject: [PATCH] [XM] Enable a bootloader when using XM via Xen-API Date: Tue, 29 Jul 2008 22:37:44 -0400 Message-ID: <1217385464.11224.5.camel@gsal-3.watson.ibm.com> Reply-To: stefanb@us.ibm.com Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-iU09gmHTx/LZVnN4iNm7" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel Cc: Keir Fraser List-Id: xen-devel@lists.xenproject.org --=-iU09gmHTx/LZVnN4iNm7 Content-Type: text/plain Content-Transfer-Encoding: 7bit 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 --=-iU09gmHTx/LZVnN4iNm7 Content-Disposition: attachment; filename=xenapi_bootloader_fix.diff Content-Type: text/x-patch; name=xenapi_bootloader_fix.diff; charset=UTF-8 Content-Transfer-Encoding: 7bit Index: root/xen-unstable.hg/tools/python/xen/xm/xenapi_create.py =================================================================== --- root.orig/xen-unstable.hg/tools/python/xen/xm/xenapi_create.py +++ root/xen-unstable.hg/tools/python/xen/xm/xenapi_create.py @@ -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": --=-iU09gmHTx/LZVnN4iNm7 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --=-iU09gmHTx/LZVnN4iNm7--