[Pkg-xen-devel] Pygrub problem

Ian Campbell ijc at hellion.org.uk
Wed Nov 26 13:31:19 UTC 2008

On Wed, 2008-11-26 at 14:14 +0100, Paul van der Vlis wrote:
>  Launching
> bootloader as ['/usr/lib/xen-3.2-1/bin/pygrub', '--args=root=/dev/sda2
> ro console=xvc0 xencons=xvc0',
> '--output=/var/run/xend/boot/xenbl.21780', '-q',
> '/dev/volume0/lenny.vandervlis.nl-swap'].

It's interesting that it appears to be looking in the -swap device for
the kernel, seems unlikely to work. I guess there is some way to make it
select a more sensible disk. I usually use a single device with a
partition so I can mark one of them bootable, I'm not sure how it works
in the multiple device pretending to be partitions way of thinking.

Does switching your disk statement make it work? e.g.
        disk        = [
This seems more like a workaround than a fix though.

This code in /usr/lib/xen-3.2-1/lib/python/xen/xend/XendDomainInfo.py
looks suspect
                    disks = [x for x in self.info['vbd_refs']
                             if self.info['devices'][x][1]['bootable']]
                    if not disks:
                        msg = "Had a bootloader specified, but no disks are bootable"
                        raise VmError(msg)
                    devinfo = self.info['devices'][disks[0]]
It goes to the trouble of making a list of bootable devices but then
ignores it and goes back to self.info['devices']. I'd guess that the
last line here should be:
		devinfo = disks[0]
Although I don't know how you make bootable be true. You may find
bringing this up on xen-devel useful.

(two questions I wrote before I noticed -swap, probably not relevant now

Does running this command by hand, possibly without the -q to make it
more verbose, tell you anything.

Is there a /boot/grub/menu.lst within the guests root?)

Ian Campbell

purpitation, n.:
	To take something off the grocery shelf, decide you
	don't want it, and then put it in another section.
		-- "Sniglets", Rich Hall & Friends

More information about the Pkg-xen-devel mailing list