Follow these instructions to create a XEN dom0 from scratch that uses pvgrub.
Prerequisites
- Debian Buster
- Internet
Create dom0
Install the xen-system package:
apt-get install xen-system-amd64 -y
Create the bridged network:
apt-get install bridge-utils -y cat /etc/network/interfaces.d/xen auto xenbr0 iface xenbr0 inet dhcp bridge_ports enp2s0
Install and configure xen-tools:
apt-get install xen-tools ##Edit /etc/xen-tools/xen-tools.conf dir = /home/bl/ ##Change to your normal user passwd = 1 ##This enables a private root password for each domU
Create a trial domU:
xen-create-image --hostname trial.blue.av --vcpus 2 --pygrub --dist buster xen create /etc/xen/trial.blue.av.cfg
Use PVgrub instead of pygrub
Boot the image using pygrub first then run these commands:
mkdir /boot/grub apt-get install linux-image-amd64 apt-get install grub2-common update-grub
- Destroy the container:
xen destroy $id ##where $id is the id of the container, you can find the id of the container using the command 'xen list'
Change parameters in the config file:
##Change from bootloader = 'pygrub' ##To kernel = /usr/lib/grub-xen/grub-x86_64-xen.bin
- Recreate the container:
xen create /etc/xen/trial.blue.av.cfg
Common issues
If grub fails to load after changing from bootloader to kernel, you have missed step #1 or it has not been done properly.