# HG changeset patch # User Ewan Mellor # Date 1167179881 0 # Node ID a9a43705f26b0892f722da1b6db8e98db49bad35 # Parent 6f8d650f3ab1cf23d00baf904abe62fb85b89377 Fix HVM booting through Xen-API when the kernel is unspecified. Signed-off-by: Ewan Mellor diff -r 6f8d650f3ab1 -r a9a43705f26b tools/python/xen/xend/XendDomainInfo.py --- a/tools/python/xen/xend/XendDomainInfo.py Wed Dec 27 00:35:27 2006 +0000 +++ b/tools/python/xen/xend/XendDomainInfo.py Wed Dec 27 00:38:01 2006 +0000 @@ -1555,6 +1555,8 @@ class XendDomainInfo: if boot: # HVM booting. self.info['image']['type'] = 'hvm' + if not 'devices' in self.info['image']: + self.info['image']['devices'] = {} self.info['image']['devices']['boot'] = boot elif not blexec and kernel: # Boot from dom0. Nothing left to do -- the kernel and ramdisk diff -r 6f8d650f3ab1 -r a9a43705f26b tools/python/xen/xend/image.py --- a/tools/python/xen/xend/image.py Wed Dec 27 00:35:27 2006 +0000 +++ b/tools/python/xen/xend/image.py Wed Dec 27 00:38:01 2006 +0000 @@ -311,6 +311,9 @@ class HVMImageHandler(ImageHandler): def configure(self, vmConfig, imageConfig, deviceConfig): ImageHandler.configure(self, vmConfig, imageConfig, deviceConfig) + + if not self.kernel: + self.kernel = '/usr/lib/xen/boot/hvmloader' info = xc.xeninfo() if 'hvm' not in info['xen_caps']: