From: "Daniel P. Berrange" <berrange@redhat.com>
To: xen-devel@lists.xensource.com
Subject: [PATCH] Fix domain creation with bootloaders
Date: Thu, 7 Dec 2006 01:20:38 +0000 [thread overview]
Message-ID: <20061207012038.GI13126@redhat.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1101 bytes --]
Some of the re-factoring work for XenAPI support in current xen-devel has
broken the creation of guests using a bootloader if done via the SEXPR
API. The first issue is that 'bootloader' is classed as legacy unsupported
in the XenConfig.py class, and the special fallback processing for it is
missing. The second issue apears to be that one of the methods called from
_configureBootloader() has changed the format of the data it returns.
The reason this was not caught earlier is that 'xm' typically runs the
bootloader client side, but libvirt lets the bootloader run server side
and thus hits this bug.
I'm attaching a patch which fixes the use of bootloaders for when creating
a domain via SEXPR protocol
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Regards,
Dan.
--
|=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=|
|=- Perl modules: http://search.cpan.org/~danberr/ -=|
|=- Projects: http://freshmeat.net/~danielpb/ -=|
|=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|
[-- Attachment #2: xen-3.0.4-bootloader.patch --]
[-- Type: text/plain, Size: 1830 bytes --]
diff -r 937c821b2310 tools/python/xen/xend/XendConfig.py
--- a/tools/python/xen/xend/XendConfig.py Wed Dec 06 20:03:53 2006 -0500
+++ b/tools/python/xen/xend/XendConfig.py Wed Dec 06 20:03:58 2006 -0500
@@ -708,6 +708,7 @@ class XendConfig(dict):
else:
self[sxp_arg] = val
+ _set_cfg_if_exists('bootloader')
_set_cfg_if_exists('shadow_memory')
_set_cfg_if_exists('security')
_set_cfg_if_exists('features')
diff -r 937c821b2310 tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py Wed Dec 06 20:03:53 2006 -0500
+++ b/tools/python/xen/xend/XendDomainInfo.py Wed Dec 06 20:08:24 2006 -0500
@@ -1327,7 +1327,7 @@ class XendDomainInfo:
# if we have a boot loader but no image, then we need to set things
# up by running the boot loader non-interactively
- if self.info.get('bootloader') and self.info.get('image'):
+ if self.info.get('bootloader'):
self._configureBootloader()
if not self._infoIsSet('image'):
@@ -1533,11 +1533,17 @@ class XendDomainInfo:
if not self.info.get('bootloader'):
return
blcfg = None
+
# FIXME: this assumes that we want to use the first disk device
- for devuuid, (devtype, devinfo) in self.info.all_devices_sxpr():
+ for (devtype, devinfo) in self.info.all_devices_sxpr():
if not devtype or not devinfo or devtype not in ('vbd', 'tap'):
continue
- disk = devinfo.get('uname')
+ disk = None
+ for param in devinfo:
+ if param[0] == 'uname':
+ disk = param[1]
+ break
+
if disk is None:
continue
fn = blkdev_uname_to_file(disk)
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
next reply other threads:[~2006-12-07 1:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-07 1:20 Daniel P. Berrange [this message]
2006-12-07 11:54 ` [PATCH] Fix domain creation with bootloaders Alastair Tse
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20061207012038.GI13126@redhat.com \
--to=berrange@redhat.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.