0

My goal is to install CentOS 8 as a Guest/DOMU on a Xen system managed/installed via Debian 10.

I need to use PV since the hardware doesn't support HVM as it is quite old. HVM would obviously simplify this greatly.

Creating Debian PV's is trivial, but installing a foreign OS from ISO or repo is proving to be very difficult for a newbie to Xen like myself.

Two resources that got me this far:

https://wiki.alpinelinux.org/wiki/Create_Alpine_Linux_PV_DomU

https://www.systutorials.com/install-paravirtualized-centos-7-domu-xen/

I have the following configuration being used to generate the VM (centos-8.2.pvlinux). You will notice kernel and ramdisk is commented out, downloading or extracting the CentOS PXEBoot kernel and RAMDisk caused failures earlier in the process, and using the Debian versions at "/" seemed to work, at least initially (CentOS version downloaded from mirror at '/centos/8.2.2004/BaseOS/x86_64/os/images/pxeboot/').

kernel = "/vmlinuz"
ramdisk = "/var/opt/xen/ISO_Store/CentosPXEBoot/initrd.img"
#ramdisk = "/initrd.img"
extra="modules=loop,squashfs console=hvc0"

# Path to HDD and iso file
disk = [
        #'file:/vmdisk0,xvda,w'
        'format=raw, vdev=xvda, access=w, target=/dev/mapper/vg_1-domain.com',
        'format=raw, vdev=xvdc, access=r, devtype=cdrom, target=/var/opt/xen/ISO_Store/CentOS-8.2.2004-x86_64-boot.iso'
       ]

#extra="ksdevice= inst.repo=https://mirror.jaleco.com/centos/8.2.2004/isos/x86_64/ nameserver=1.1.1.1"

# Network configuration
vif = ['bridge=xenbr0']

# DomU settings
memory = 3072
name = "centos-8.2"

This causes the following, I have abbreviated the output:

Parsing config from /etc/xen/centos-8.2.pvlinux
[    0.000000] Linux version 4.19.0-10-amd64 ([email protected]) (gcc version 8.3.0 (Debian 8.3.0-6)) #1 SMP Debian 4.19.132-1 (2020-07-24)
[    0.000000] Command line: modules=loop,squashfs console=hvc0

....

[   16.434798] systemd[1]: Detected virtualization xen.
[   16.434844] systemd[1]: Detected architecture x86-64.
[   16.434880] systemd[1]: Running in initial RAM disk.

Welcome to CentOS Linux 8 (Core) dracut-049-70.git20200228.el8 (Initramfs)!

[   16.446415] systemd[1]: No hostname configured.
[   16.446473] systemd[1]: Set hostname to <localhost>.
[   16.446725] random: systemd: uninitialized urandom read (16 bytes read)
[   16.446775] systemd[1]: Initializing machine ID from random generator.
[   16.621449] random: ln: uninitialized urandom read (6 bytes read)
[   16.623730] random: ln: uninitialized urandom read (6 bytes read)
[   17.062380] systemd[1]: Reached target Timers.
[  OK  ] Reached target Timers.

....


[  OK  ] Started iSCSI UserSpace I/O driver.
[  OK  ] Stopped iSCSI UserSpace I/O driver.
[FAILED] Failed to start iSCSI UserSpace I/O driver.
See 'systemctl status iscsiuio.service' for details.
[   22.462372] systemd[1]: Started Journal Service.
[  OK  ] Started Journal Service.
[   23.688098] dracut: FATAL: iscsiroot requested but kernel/initrd does not support iscsi
[   23.688178] dracut: Refusing to continue
[   23.869896] systemd-shutdow: 56 output lines suppressed due to ratelimiting
[   24.013409] systemd-shutdown[1]: Syncing filesystems and block devices.
[   24.013708] systemd-shutdown[1]: Sending SIGTERM to remaining processes...
[   24.019611] systemd-journald[121]: Received SIGTERM from PID 1 (systemd-shutdow).
[   24.026531] systemd-shutdown[1]: Sending SIGKILL to remaining processes...
[   24.032149] systemd-shutdown[1]: Unmounting file systems.
[   24.038715] [371]: Remounting '/' read-only in with options 'size=1497604k,nr_inodes=374401'.
[   24.039938] systemd-shutdown[1]: All filesystems unmounted.
[   24.039986] systemd-shutdown[1]: Deactivating swaps.
[   24.040223] systemd-shutdown[1]: All swaps deactivated.
[   24.040259] systemd-shutdown[1]: Detaching loop devices.
[   24.040650] systemd-shutdown[1]: All loop devices detached.
[   24.040687] systemd-shutdown[1]: Detaching DM devices.
[   24.051030] xenbus: xenbus_dev_shutdown: device/vif/0: Initialising != Connected, skipping
[   24.051080] xenbus: xenbus_dev_shutdown: device/vbd/51744: Initialising != Connected, skipping
[   24.051114] xenbus: xenbus_dev_shutdown: device/vbd/51712: Initialising != Connected, skipping
[   24.051183] reboot: System halted

I have tried removing the ISO and using the Extras line for grabbing the ISO, but I have the same result.

I have also tried creating a non-volume group disk, same result.

Any guidance is very much appreciated, thank you.


Update:

Long story short. There seems to be a consensus that CentOS 8 does not support PV environments.

Why this isn't supported is beyond me, since this prevents usage of PVH environments that perform much better than default HVM setups.

There is apparently support within PV using a third party kernel from elrepo. But how you could manage to install Centos8 within a PV using this is not something I'd care to figure out myself. This kernel primarily seems useful for individuals who want to use PVH environments where PV interfaces are used within HVM.

I'll have to use different OS for now.

1 Answer 1

1

CentOS 8's default kernel has no support for Xen PV or PVH - these were removed by Red Hat. It can be run as HVM but you said that your hardware does not support that.

It is possible to run CentOS 8 in PV or PVH mode by enabling the elrepo and using kernel-ml from it as your kernel. That is the mainline Linux kernel and as such hasn't had Xen PV/PVH support removed from it. elrepo does however come with no form of support.

You can install it into a chroot from any existing Linux or Unix-like computer. Here are some step by step instructions which use this provider's "rescue VM" but if you have administrative access to the host computer you can do it from there.

https://tools.bitfolk.com/wiki/Installing_CentOS_8

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .