xen host // debian dom0

deploy

apt install lsb-release
lsb_release -a

apt search xen | grep ^xen
apt install xen-system-amd64 bridge-utils vlan

notice you get qemu-system-xen and some grub flavor with it

dpkg -l | grep qemu
dpkg -l | grep grub

serial output

for some reason, serial-getty does not manage to work with hvc0 with the cloud kernel

#apt install linux-image-cloud-amd64

so you have to install that one for the dom0 to print system msgs and getty on the xen hypervisor console

apt install linux-image-amd64

also this should not harm – although deemed unnecessary

systemctl enable serial-getty@hvc0
ls -lF /etc/systemd/system/getty.target.wants/

booting

–either– grub

check for micro-kernel boot setup

ls -lhF /boot/xen*
ls -lF /etc/default/grub.d/

–or– syslinux

make sure those are available for easy-peasy SYSLINUX setup

ls -lhF /xen.gz
ls -lhF /vmlinuz
ls -lhF /initrd.img
vi /boot/syslinux/syslinux.cfg

label XEN
        kernel mboot.c32
        append /xen.gz loglvl=info guest_loglvl=info smt=1 ept=exec-sp com1=115200,8n1 console=com1 --- /vmlinuz root=/dev/vda1 ro console=hvc0 earlyprintk=xen net.ifnames=0 biosdevname=0 mitigations=off --- /initrd.img

network setup

see host-network-debian

ready to go

shutdown -r now

and check once rebooted

cat /proc/cmdline
dmesg | grep xen
xl dmesg
xl info | grep xen_commandline
xl list

operations

status

systemctl list-unit-files | grep xen
ls -lhF /etc/init.d/xen*
systemctl status xen.service
systemctl status xend.service
systemctl status xendomains.service
systemctl status xenstored.service

restart all

systemctl stop xen.service
systemctl stop xenstored.service
systemctl start xenstored.service
systemctl start xen.service

Additional notes

deprecated

allow NetBSD guests and switch to Debian network scripts

cp -i /etc/default/grub.d/xen.cfg /etc/default/grub.d/xen.cfg.dist
vi /etc/default/grub.d/xen.cfg

GRUB_CMDLINE_XEN="pv-linear-pt=true"

update-grub
grep linear /boot/grub/grub.cfg

and disable save/restore, which breaks NetBSD guests

systemctl stop xendomains.service
systemctl disable xendomains.service

resources

https://help.ubuntu.com/community/Xen

https://wiki.debian.org/Xen


HOME | GUIDES | LECTURES | LAB | SMTP HEALTH | HTML5 | CONTACT
Copyright © 2024 Pierre-Philipp Braun