Updated : Nov 29, 2016 in Linux

Installing Xen Hypervisor 4.8 on Debian Jessie

I was looking for a way to install Xen 4.8 in Jessie because in some of the newest Processors Intel series called Skylake the default version of Xen Hypervisor on Jessie (4.4) results in endless booting loops.
NOTE: If you already had the Xen 4.4(original installed) no worries the version 4.4 will not be uninstalled but the new version 4.8 will be the only one active.

This short howto is based on this link which is also been recommended by Hetzner provider in Germany.

You have to pin stretch and stretch-updates to 499, jessie and jessie-updates to 500, then install xen-hypervisor-4.8-amd64 manually from stretch:

cat <<EOF | sudo tee /etc/apt/preferences.d/stretch-manual-only
Package: *
Pin: release n=jessie-updates
Pin-Priority: 500
Package: *
Pin: release n=jessie
Pin-Priority: 500
Package: *
Pin: release n=stretch-updates
Pin-Priority: 499
Package: *
Pin: release n=stretch
Pin-Priority: 499

Create a sources list for stretch:
sed -e 's/ \(stable\|jessie\)/ stretch/ig' /etc/apt/sources.list > /etc/apt/sources.list.d/debian-stretch.list
aptitude update

Those are the needed packages for Xen 4.8:
aptitude install xen-utils-common/stretch xen-utils-4.8/stretch xen-tools xen-hypervisor-4.8-amd64/stretch libncurses5/stretch libncursesw5/stretch libtinfo5/stretch

Possible output of command, but can also be different.
The following packages will be upgraded:
libxen-4.8 xen-hypervisor-4.8-amd64 xen-utils-4.8 xen-utils-common
Do you want to continue? [Y/n/?]

You also answer ‘Y‘ to this one.
Make sure all the packages are now up-to-date:
aptitude -y dist-upgrade
Continue with changing the boot order in grub:
dpkg-divert --divert /etc/grub.d/08_linux_xen --rename /etc/grub.d/20_linux_xen

Check grub menu entries in order with:
grep -i "menuentry '" /boot/grub/grub.cfg|sed -r "s|--class .*$||g"|nl -v 0
Now the first line should be
0 menuentry 'Debian GNU/Linux, with Xen hypervisor'
Reboot and have fun 😉


  • Thank you very much; after not getting Xen 4.4 working on UEFI I was looking for a way to install 4.8.
    My only problem is that I can’t start a VM because the qemu binaries aren’t located in the 4.8/bin folder. Do you have a fix for that?

    1. Well in my Xen server I don’t need to have ‘qemu’ in this path. Just make sure you have installed those 3 packages:
      qemu-system-common 1:2.1+dfsg-12+deb8u6 amd64 QEMU full system emulation binaries (common files)
      qemu-system-x86 1:2.1+dfsg-12+deb8u6 amd64 QEMU full system emulation binaries (x86)
      qemu-utils 1:2.1+dfsg-12+deb8u6 amd64 QEMU utilities

      Maybe I should add these 3 packages in the instructions of what to install in the article.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: