Xen installation

From ERIKA WIKI
Revision as of 08:49, 6 May 2019 by Ida (talk | contribs)
Jump to: navigation, search

The section contains the instruction to install Xen hypervisor on platform x86_64 with one of the following operating system:

  • Ubuntu 16.04
  • Ubuntu 18.04.1 LTS

Build Dependencies

Install the following packages:

 # apt update && apt dist-upgrade #update/upgrade the kernel
 # apt install build-essential
 # apt install bcc bin86 gawk bridge-utils iproute2 
 # apt install libcurl4 libcurl4-openssl-dev bzip2 module-init-tools transfig tgif
 # apt install texinfo texlive-latex-base texlive-latex-recommended texlive-fonts-extra texlive-fonts-recommended
 # apt install pciutils-dev mercurial
 # apt install make gcc libc6-dev zlib1g-dev python python-dev python-twisted 
 # apt install libncurses5-dev patch libsdl-dev libjpeg-dev
 # apt install libvncserver-dev
 # apt install iasl libbz2-dev e2fslibs-dev git-core uuid-dev 
 # apt install ocaml ocaml-findlib libx11-dev bison flex xz-utils libyajl-dev
 # apt install gettext libpixman-1-dev libaio-dev markdown pandoc
 # apt install libc6-dev-i386
 # apt install lzma lzma-dev liblzma-dev #for rombios
 # apt install libsystemd-dev 

Retrieve the GRUB version

The Xen installation strictly depends on the installed Grub version: grub-pc or grub-efi. In order to retrieve the grub version, launch the following command:

 $ dpkg --get-selections | grep grub

Xen Installation

Retrieve Xen source
Clone the Xen repository and switch to the chosen version (i.e., RELEASE 4.11):

 $ git clone https://github.com/xen-project/xen.git
 $ cd xen
 $ git checkout RELEASE-4.11.0 -b RELEASE-4.11.0

In the following part of the tutorial, we refer to the Xen repository path as $XENPATH.

Configure
Configure:

 $ $XENPATH/configure --enable-systemd

In case of Xen EFI (as for example in Ubuntu 18.04.01), add the option --enable-targets=x86_64-pep as follows:

 $ $XENPATH/configure --enable-systemd --enable-targets=x86_64-pep

Build and install
Build all components (hypervisor, tools, docs, stubdomains, etc):

 $ cd $XENPATH
 $ make dist

Install (as root):

 # make install

Enable the Xen services
Reload dynamic libraries:

 # /sbin/ldconfig

Enable systemd Xen services:

 # systemctl enable xen-qemu-dom0-disk-backend.service
 # systemctl enable xen-init-dom0.service
 # systemctl enable xenconsoled.service
 # systemctl enable xenstored.service
 # systemctl enable xendomains.service

Note that in case of error for enabling xendomains service, remove /etc/init.d/xendomains.

Update grub
Finally, update grub and reboot:

 # udate-grub
 # reboot