Mailing List Archive

Ubuntu 20.04 domu problem
I am working on moving our Xen servers to Ubuntu 20.04 and am having
problems creating domu's using xen-tools. The xen-create-image
execution completes but the resulting domu does not boot. Here is the
command line I am using for the build.

/usr/bin/xen-create-image --hostname=zoot.ca-zephyr.org \
--memory=4Gb --genpass=1 --size=40Gb --dhcp --vcpus=2 \
--pygrub --swap=2Gb --role=udev,/etc/xen-tools/role.d/cz-bionic \
--dist=bionic --arch=amd64

The resulting container does not have grub installed. When I look at ?
I see that the attempt is to install grub. But the "grub" package is
not available on 20.04.

At this point I started just hacking. I changed to using pvgrub by
commenting out the 'bootloader' parameter in the domu configuration file
and added the line 'which resulted in booting the container to the
"grub>" prompt. But with the domu's /boot empty this of course did not
lead anywhere. I then just hacked on
/usr/share/xen-tools/focal.d/82-install-grub-legacy and changed the
install line to 'grub2'. With that the domu boot directory was not
empty, but the boot still stopped at the 'grub>' prompt.

So, now that I have done this the wrong way I would be very grateful is
someone could point me in the correct direction.

Thanks in advance,

Bill

--
Bill MacAllister <bill@ca-zephyr.org>
Re: Ubuntu 20.04 domu problem [ In reply to ]
Hello,

On Tue, Nov 10, 2020 at 01:57:14PM -0800, Bill MacAllister wrote:
> I am working on moving our Xen servers to Ubuntu 20.04 and am having
> problems creating domu's using xen-tools.

[…]

> At this point I started just hacking. I changed to using pvgrub by
> commenting out the 'bootloader' parameter in the domu configuration file and
> added the line 'which resulted in booting the container to the "grub>"
> prompt. But with the domu's /boot empty this of course did not lead
> anywhere. I then just hacked on
> /usr/share/xen-tools/focal.d/82-install-grub-legacy and changed the install
> line to 'grub2'. With that the domu boot directory was not empty, but the
> boot still stopped at the 'grub>' prompt.

I haven't looked at pygrub in quite a few years, having moved to
pvgrub, but please note that Ubuntu 20.04 uses LZ4-compressed
kernels which pvgrub doesn't currently support.

If wanting to do pvgrub with Ubuntu 20.04 you'll need to decompress
the kernels with something like this:

https://github.com/bitfolk/decompress-lz4-kernels

Or switch to PVH, which has no such problems.

Cheers,
Andy