User Tools

Site Tools


unix:virtualization:xen:dom0

This is an old revision of the document!


Xen DOM0

Limit DOM0 memory

At times, the DOM0 will attempt to grab all RAM and make it where no virtuals can exist. There may be other reasons to limit the amount of memory available to the DOM0, though I generally like to give it a bunch so it can cache things.

However, you can limit the amount of memory the DOM0 can have by adding the following to /etc/default/grub. While we're at it, I'm limiting it to 4 virtual cpu's, and disabling grub's OS Prober, which will find lvm2 and iSCSI drives (which are my virtual's boot drive).

default_grub
# Limit DOM0 memory to 4096M (4G) and allow to grow to 16384M (16G) if possible
GRUB_CMDLINE_XEN="dom0_mem=4096M,max:4096M dom0_max_vcpus=4"
# don't probe anything but the boot drive for os'
GRUB_DISABLE_OS_PROBER=true

You also don't want xl to automatically balloon memory for DOM0, so edit /etc/xen/xl.conf and modify the 'autoballoon' directive

autoballoon="0"

After you have added this, you need to update your grub install with the following command.

update-grub2

DOM0 and UEFI

I have run into some serious issues trying to get a DOM0 to boot with UEFI. A fresh Devuan (Debian) install works just fine, then when the Xen kernel is brought up, the boot fails. I don't remember the exact issue, but it has been around for several years.

The article at https://wiki.xenproject.org/wiki/Xen_EFI describes how to build a custom kernel.

However, I my fix is to simply set the server to boot into legacy BIOS mode. As long as that is an option, it appears to be better for the time being.

unix/virtualization/xen/dom0.1594572164.txt.gz · Last modified: 2020/07/12 11:42 by rodolico