apt -y install xen-system # if you don't do this, it will boot into non-xen kernel dpkg-divert --divert /etc/grub.d/08_linux_xen --rename /etc/grub.d/20_linux_xen # now, limit DOM0 memory to 4G echo '# Xen boot parameters for all Xen boots' >> /etc/default/grub echo 'GRUB_CMDLINE_XEN="dom0_mem=4096M,max:4096M"' >> /etc/default/grub echo '# do not probe anything but the boot drive for os' >> /etc/default/grub echo 'GRUB_DISABLE_OS_PROBER=true' >> /etc/default/grub echo 'autoballoon="0"' >> /etc/xen/xl.conf # and tell grub to update itself update-grub # tell Xen to use the xl tool stack. It appears with newer Debian releases, this is the default # so probably not necessary # NOT TESTED, you may have to hand edit. echo 'TOOLSTACK=xl' >> /etc/default/xen # at this point, we are ready to go, so reboot the system into the Xen kernel reboot