Mailing List Archive

xen domu problems
I am working on using FAI to build domU's. I thought I was had it
figured out
but when I went to stamp out my work with chef I found that only my test
system
was building bootable VMs. On the failing Xen servers the build is
successful
but when I attempt to boot the system I get the following errors.

# /usr/sbin/xl create /etc/xen/zoot-lab-2.domain.com.cfg
Parsing config from /etc/xen/zoot-lab-2.corp.domain.com.cfg
xc: error: panic: xc_dom_core.c:208: failed to open file
'/boot/vmlinuz': No such file or directory: Internal error

The relevant part of zoot-lab-2.domain.com.cfg is:

kernel = '/boot/vmlinuz'
ramdisk = '/boot/initrd.img'
root = '/dev/xvda1 ro'
disk = [

'phy:/dev/vg_xen/zoot-lab-2.corp.dropbox.com-disk,xvda1,w',
]

The error seems to indicate that it cannot find the disk or the kernel.
When I
mount the disk I can see /boot/vmlinuz and /boot/init.img on both the
working
and the failing systems.

The Xen hypervisors are build on Ubuntu Bionic (18.04) with Xen 4.9.
The
stock Xen delivery from Ubuntu. The VM I am building is Ubuntu Focal
(20.04).

There is something I am missing and I could use some suggestions about
what I
should be looking for.

Thanks in advance,

Bill

--
Bill MacAllister <bill@ca-zephyr.org>
Re: xen domu problems [ In reply to ]
Bill MacAllister schrieb:

> # /usr/sbin/xl create /etc/xen/zoot-lab-2.domain.com.cfg
> Parsing config from /etc/xen/zoot-lab-2.corp.domain.com.cfg
> xc: error: panic: xc_dom_core.c:208: failed to open file
> '/boot/vmlinuz': No such file or directory: Internal error
>
> The relevant part of zoot-lab-2.domain.com.cfg is:
>
> kernel      = '/boot/vmlinuz'
> ramdisk     = '/boot/initrd.img'
> root        = '/dev/xvda1 ro'
> disk        = [
> 'phy:/dev/vg_xen/zoot-lab-2.corp.dropbox.com-disk,xvda1,w',
>               ]

Using this configuration you advise Xen to find the kernel at
/boot/vmlinuz on the *host*, not inside the disk image. The same thing
applies to the ramdisk.

In addition, your root specification should only contain the device, and
extra parameters (if needed) go to extra = 'ro'.

--
Manfred Härtel, DB3HM mailto:Manfred.Haertel@rz-online.de
http://rz-home.de/mhaertel
Re: xen domu problems [ In reply to ]
On 2021-02-12 23:50, Bill MacAllister wrote:
> I am working on using FAI to build domU's. I thought I was had it
> figured out
> but when I went to stamp out my work with chef I found that only my
> test system
> was building bootable VMs. On the failing Xen servers the build is
> successful
> but when I attempt to boot the system I get the following errors.
>
> # /usr/sbin/xl create /etc/xen/zoot-lab-2.domain.com.cfg
> Parsing config from /etc/xen/zoot-lab-2.corp.domain.com.cfg
> xc: error: panic: xc_dom_core.c:208: failed to open file
> '/boot/vmlinuz': No such file or directory: Internal error
>
> The relevant part of zoot-lab-2.domain.com.cfg is:
>
> kernel = '/boot/vmlinuz'
> ramdisk = '/boot/initrd.img'
> root = '/dev/xvda1 ro'
> disk = [
>
> 'phy:/dev/vg_xen/zoot-lab-2.corp.dropbox.com-disk,xvda1,w',
> ]
>
> The error seems to indicate that it cannot find the disk or the kernel.
> When I
> mount the disk I can see /boot/vmlinuz and /boot/init.img on both the
> working
> and the failing systems.
>
> The Xen hypervisors are build on Ubuntu Bionic (18.04) with Xen 4.9.
> The
> stock Xen delivery from Ubuntu. The VM I am building is Ubuntu Focal
> (20.04).
>
> There is something I am missing and I could use some suggestions about
> what I
> should be looking for.

I having been staring at this problem for days now and I just don't see
it.
Last thing I tried was to build a VM on the "failing" hypervisor,
confirm
that it would not boot, move it to the "working hypervisor", and confirm
that
it would boot. So, that argues that the build is fine. It is something
I
am not getting correct in the hypervisor configuration. I could really
use
some suggestions for things to try.

Bill

--
Bill MacAllister <bill@ca-zephyr.org>
Re: xen domu problems [ In reply to ]
Hi Bill,

On Sun, Feb 14, 2021 at 12:21:40AM -0800, Bill MacAllister wrote:
> It is something I am not getting correct in the hypervisor
> configuration. I could really use some suggestions for things to
> try.

Did you read Manfred's answer? It is correct as far as I can see:
your kernel and initrd probably don't exist in the *host* (dom0).

You should consider using a bootloader like pvgrub2 or pygrub so
that you can use the boot configuration of the domU.

Note that from 20.04, Ubuntu switched to LZ4-compressed kernels and
unless you have a very recent version of Xen it won't be able to
decompress these for direct kernel boot. From Ubuntu 20.04 you can
use PVH mode and pvhgrub on any version of Xen that supports PVH
mode.

Cheers,
Andy
Re: xen domu problems [ In reply to ]
On 2021-02-13 06:25, Manfred Haertel, DB3HM wrote:
> Bill MacAllister schrieb:
>
>> # /usr/sbin/xl create /etc/xen/zoot-lab-2.domain.com.cfg
>> Parsing config from /etc/xen/zoot-lab-2.corp.domain.com.cfg
>> xc: error: panic: xc_dom_core.c:208: failed to open file
>> '/boot/vmlinuz': No such file or directory: Internal error
>>
>> The relevant part of zoot-lab-2.domain.com.cfg is:
>>
>> kernel      = '/boot/vmlinuz'
>> ramdisk     = '/boot/initrd.img'
>> root        = '/dev/xvda1 ro'
>> disk        = [
>> 'phy:/dev/vg_xen/zoot-lab-2.corp.dropbox.com-disk,xvda1,w',
>>               ]
>
> Using this configuration you advise Xen to find the kernel at
> /boot/vmlinuz on the *host*, not inside the disk image. The same thing
> applies to the ramdisk.
>
> In addition, your root specification should only contain the device,
> and extra parameters (if needed) go to extra = 'ro'.

Thanks Manfred. That explains my mistakes.

Bill

--
Bill MacAllister <bill@ca-zephyr.org>
Re: xen domu problems [ In reply to ]
On 2021-02-14 00:52, Andy Smith wrote:
> Hi Bill,
>
> Did you read Manfred's answer? It is correct as far as I can see:
> your kernel and initrd probably don't exist in the *host* (dom0).

I am embarrassed to say that I missed it in the trash dump that is
my inbox. Apologies Manfred and thanks for your quick response.
Manfred's response certainly explained the problem clearly.

> You should consider using a bootloader like pvgrub2 or pygrub so
> that you can use the boot configuration of the domU.
>
> Note that from 20.04, Ubuntu switched to LZ4-compressed kernels and
> unless you have a very recent version of Xen it won't be able to
> decompress these for direct kernel boot. From Ubuntu 20.04 you can
> use PVH mode and pvhgrub on any version of Xen that supports PVH
> mode.

Yes, the 20.04 problem is why I started down the road of using FAI
to build the VMs. I was having problems getting xen tools to build
bootable 20.04 domu. Likely my own problem, but I am a lot more
familiar with FAI then xen-tools. Thanks for helping get moving
again. In spite of the fact that I wear glasses I often find that
4 eyes is not enough for me to see what is in front of my face.

Thanks,

Bill

--
Bill MacAllister <bill@ca-zephyr.org>