User Tools

Site Tools



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).

# 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'

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


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



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 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.txt · Last modified: 2020/07/12 11:42 by rodolico