CentOS 8 as a Xen PV Guest

Issues related to applications and software problems and general support
ChrisE
Posts: 4
Joined: 2015/08/02 20:46:46

CentOS 8 as a Xen PV Guest

Post by ChrisE » 2019/10/02 17:52:52

Has anyone managed to get CentOS 8 running as a Xen PV guest?

In my testing the kernel flat out fails to launch off pygrub, so has RedHat removed all Xen support from RHEL8 including PV_Ops/DomU?
xc: error: panic: xc_dom_core.c:702: xc_dom_find_loader: no loader found: Invalid kernel
libxl: error: libxl_dom.c:721:libxl__build_dom: xc_dom_parse_image failed: No such file or directory

rumcho
Posts: 1
Joined: 2019/10/04 08:06:01

Re: CentOS 8 as a Xen PV Guest

Post by rumcho » 2019/10/04 08:07:25

I'm having the exact same issue. And I see no "xen" directory anywhere on the new CentOS 8 tree.

regex
Posts: 2
Joined: 2019/10/21 18:03:35

Re: CentOS 8 as a Xen PV Guest

Post by regex » 2019/10/21 18:06:48

I had the same issue while looking into building a new xen PV template for CentOS 8. Pygrub seems incompatible with the new Grub2 configuration in CentOS 8. The kernels are not listed anymore in grub.cfg so pygrub can't parse them.

regex
Posts: 2
Joined: 2019/10/21 18:03:35

Re: CentOS 8 as a Xen PV Guest

Post by regex » 2019/10/29 17:50:05

Quick follow up, you can make pygrub working again by disabling grub2 BLS in el8:

Code: Select all

sed -i 's/^GRUB_ENABLE_BLSCFG=.*/GRUB_ENABLE_BLSCFG=false/' /etc/default/grub
grub2-mkconfig -o /boot/grub2/grub.cfg
EL8 would still need this patch that has been added to Fedora 30: https://bugzilla.redhat.com/attachment. ... ction=diff

Grepknowledge
Posts: 1
Joined: 2019/11/02 20:06:14

Re: CentOS 8 as a Xen PV Guest

Post by Grepknowledge » 2019/11/02 20:18:34

Same issue here , trying to make Centos8 work under XEN PV , still doesn't boot and showing this exact log error

Code: Select all

xc: error: panic: xc_dom_core.c:702: xc_dom_find_loader: no loader found: Invalid kernel

burnley
Posts: 4
Joined: 2018/05/10 02:46:56

Re: CentOS 8 as a Xen PV Guest

Post by burnley » 2019/11/08 05:52:01

Stock CentOS 8 kernel doesn't boot as either PV or PVH, only as HVM. But managed to boot the domU as PVH using kernel-ml from ELRepo, currently running 5.3.8-1.el8.elrepo.x86_64. When booted as PV it crashes:

[ 5.772001] BUG: unable to handle page fault for address: ffffc900401f7818
[ 5.772023] #PF: supervisor read access in kernel mode
[ 5.772035] #PF: error_code(0x0000) - not-present page
[ 5.772047] PGD bc9d6067 P4D bc9d6067 PUD fd2c067 PMD fd2d067 PTE 0
[ 5.772062] Oops: 0000 [#1] SMP NOPTI
[ 5.772073] CPU: 1 PID: 596 Comm: systemd-udevd Not tainted 5.3.8-1.el8.elrepo.x86_64 #1
[ 5.772091] RIP: e030:pmc_core_probe+0x13a/0x2c0 [intel_pmc_core]
[ 5.772105] Code: c0 48 c7 c6 ab 01 19 c0 48 8d 7d 28 e8 5f c3 f9 c0 48 8b 05 a8 48 00 00 48 89 ab 88 00 00 00 48 63 40 44 48 03 05 8e 48 00 00 <8b> 00 48 8b 15 8d 48 00 00 48 c7 c7 c0 0b 19 c0 8b 4a 48 ba 01 00
[ 5.772142] RSP: e02b:ffffc900402afaf0 EFLAGS: 00010286
[ 5.772155] RAX: ffffc900401f7818 RBX: ffffffffc0199000 RCX: 0000000002ffffff
[ 5.772527] RDX: ffffffffc01944c0 RSI: ffffffffc01901ab RDI: ffffffffc0194508
[ 5.772911] RBP: ffffffffc01944e0 R08: ffffc900401f6000 R09: ffffc900401f6000
[ 5.773290] R10: 0000000000007ff0 R11: ffff888006736420 R12: ffffffffc0194028
[ 5.773676] R13: ffffffffc0194028 R14: 0000000000000008 R15: ffffffffc0199000
[ 5.774069] FS: 00007f106c336940(0000) GS:ffff8880bc100000(0000) knlGS:0000000000000000
[ 5.774464] CS: e030 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 5.774860] CR2: ffffc900401f7818 CR3: 00000000b78c4000 CR4: 0000000000040660
[ 5.775288] Call Trace:
[ 5.775690] platform_drv_probe+0x35/0x80
[ 5.776088] really_probe+0xef/0x390
[ 5.776489] ? driver_allows_async_probing+0x50/0x50
[ 5.776887] driver_probe_device+0xb4/0x100
[ 5.777277] ? driver_allows_async_probing+0x50/0x50
[ 5.777675] bus_for_each_drv+0x75/0xc0
[ 5.778096] __device_attach+0xd4/0x160
[ 5.778491] bus_probe_device+0x87/0xa0
[ 5.778863] device_add+0x40f/0x660
[ 5.779229] platform_device_add+0x10e/0x240
[ 5.779605] ? 0xffffffffc01cc000
[ 5.779975] do_one_initcall+0x46/0x1f4
[ 5.780357] ? _cond_resched+0x15/0x30
[ 5.780722] ? kmem_cache_alloc_trace+0x14c/0x220
[ 5.781087] do_init_module+0x5a/0x220
[ 5.781452] load_module+0x179d/0x1930
[ 5.781807] ? __do_sys_init_module+0x141/0x190
[ 5.782157] ? _cond_resched+0x15/0x30
[ 5.782509] __do_sys_init_module+0x141/0x190
[ 5.782851] do_syscall_64+0x5f/0x1f0
[ 5.783189] entry_SYSCALL_64_after_hwframe+0x44/0xa9
[ 5.783532] RIP: 0033:0x7f106af2a4ae
[ 5.783862] Code: 48 8b 0d dd 09 2c 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 49 89 ca b8 af 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d aa 09 2c 00 f7 d8 64 89 01 48
[ 5.784875] RSP: 002b:00007ffe5fc85768 EFLAGS: 00000246 ORIG_RAX: 00000000000000af
[ 5.785212] RAX: ffffffffffffffda RBX: 000055c89ecbf9b0 RCX: 00007f106af2a4ae
[ 5.785549] RDX: 00007f106ba9680d RSI: 0000000000001dd0 RDI: 000055c89f5310a0
[ 5.785887] RBP: 00007f106ba9680d R08: 000055c89ecb33a0 R09: 0000000000000003
[ 5.786225] R10: 0000000000000004 R11: 0000000000000246 R12: 000055c89f5310a0
[ 5.786575] R13: 000055c89ecb4310 R14: 0000000000020000 R15: 0000000000000000
[ 5.786913] Modules linked in: intel_pmc_core_pltdrv(+) intel_pmc_core crct10dif_pclmul crc32_pclmul xen_fbfront(+) syscopyarea sysfillrect sysimgblt ghash_clmulni_intel joydev fb_sys_fops pcspkr xen_kbdfront intel_rapl_perf ip_tables ext4 mbcache jbd2 xen_netfront xen_blkfront crc32c_intel
[ 5.787945] CR2: ffffc900401f7818
[ 5.788292] ---[ end trace a3f64be860281e19 ]---
[ 5.788629] RIP: e030:pmc_core_probe+0x13a/0x2c0 [intel_pmc_core]
[ 5.788971] Code: c0 48 c7 c6 ab 01 19 c0 48 8d 7d 28 e8 5f c3 f9 c0 48 8b 05 a8 48 00 00 48 89 ab 88 00 00 00 48 63 40 44 48 03 05 8e 48 00 00 <8b> 00 48 8b 15 8d 48 00 00 48 c7 c7 c0 0b 19 c0 8b 4a 48 ba 01 00

SteffanCline
Posts: 2
Joined: 2015/04/17 13:29:13

Re: CentOS 8 as a Xen PV Guest

Post by SteffanCline » 2019/11/08 06:27:05

I was able to boot my VM as HVM to make the changes and applied the patch as suggested.

Code: Select all

sed -i 's/^GRUB_ENABLE_BLSCFG=.*/GRUB_ENABLE_BLSCFG=false/' /etc/default/grub
grub2-mkconfig -o /boot/grub2/grub.cfg
I installed CentOS 8 in a single partition just to minimize the possibility of issues. I changed the config back to PV and started the guest. No matter what I try, it always goes to the grubdom> prompt. I'm not sure where to go from there. Below is my config

Code: Select all

memory = 24576
maxmem = 24576
vcpus = 8
name = 'test'
vif = [ 'ip=x.x.x.x,mac=00:16:3e:BF:EE:2A,bridge=xenbr0','ip=x.x.x.x,mac=00:16:3e:BF:EE:2B,bridge=xenbr1' ]
address = 'x.x.x.x'
netmask = '255.255.255.0'
disk = ['phy:/dev/vg_h1/test_img,xvda1,w']
boot = 'dc'
on_reboot = 'restart'
on_crash = 'restart'
kernel = "/usr/lib64/xen/boot/pv-grub-x86_64.gz"
extra = "(hd0)/boot/grub2/grub.conf"
vnc = 1
vnclisten = "0.0.0.0"
vncunused = 1
vfb = ['type=vnc,vncunused=1,vncpasswd=xokspfky,vnclisten=0.0.0.0']
vncpasswd = "test"

squeedlyspooge
Posts: 1
Joined: 2019/12/19 20:11:02

Re: CentOS 8 as a Xen PV Guest

Post by squeedlyspooge » 2019/12/19 20:13:10

Has anyone managed to find a way to get this working (CentOS 8 on Xen)? We've been unsuccessful ourselves.

ttn
Posts: 2
Joined: 2020/08/07 12:40:47

Re: CentOS 8 as a Xen PV Guest

Post by ttn » 2020/08/07 12:55:07

Hey,

I just managed to have a centos 8 booted in PV mode \o/ jeee. So here is what had to be done:

- Installed it in HVM mode using netinstall/cdrom or whatever makes it installed :)
- During the installation create a separate standalone partition for the /boot using ext3 filesystem on /dev/xvda1. This is important for the xen pygrub loader. If you prefer LVM then it can be on the /dev/xvda2 for the rest. If for some reason you already have the /boot as ext4 then it also works if you backup the partition, recreate it as ext3 and re-run the grub2-install for the disk device like

Code: Select all

grub2-install /dev/xvda
- Once you have the above the the unable to find partition with the kernel message goes away, however it turns into an invalid kernel message. After some time it turned out that there is only one repository available with the correct kernel configuration for a xen guest operation which is the ELRepo (https://elrepo.org). This repo can be installed via:

Code: Select all

rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
yum install https://www.elrepo.org/elrepo-release-8.el8.elrepo.noarch.rpm
Then the kernel-ml package is ready to be installed with:

Code: Select all

yum --enablerepo=elrepo-kernel install kernel-ml
Once is done remove all the other kernel related files from the /boot directory (including the rescue entry) and leave only the newly installed kernel files (vmlinuz, initramfs) and run

Code: Select all

grub2-mkconfig -o /boot/grub2/grub.cfg
And the system is ready to be rebooted into PV mode, don't forget to remove the builder HVM and to add the bootloader pygrub entries into the xen configuration file for the vm.

So nuttshell, ext3 standalone /boot partition and a compatible kernel from the ELRepo repository.

Hope this helps whoever needs it:)

peace & love

User avatar
TrevorH
Forum Moderator
Posts: 29903
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: CentOS 8 as a Xen PV Guest

Post by TrevorH » 2020/08/07 13:07:10

- During the installation create a separate standalone partition for the /boot using ext3 filesystem on /dev/xvda1. This is important for the xen pygrub loader. If you prefer LVM then it can be on the /dev/xvda2 for the rest. If for some reason you already have the /boot as ext4 then it also works if you backup the partition, recreate it as ext3 and re-run the grub2-install for the disk device like
Two things about that: first, installing /boot on LVM is totally unsupported. It must be a physical primary partition.
Second, I've got no idea why you think that ext4 is disallowed. When I used xen for the 5 years or so that I did, it was quite happy to boot from /boot on ext4.
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

Post Reply

Return to “CentOS 8 - General Support”