Development environment setup for Xen Project sounded easy to me. But it proved to be a worthy task of a standalone article. So, now I will be guiding you through the process of installing Xen Project software from source code. This article was written targeting the Xen Project 4.7-unstable on Ubuntu 15.10 (4.2.0-19-generic), but majority of steps may remain same for future versions.
Getting Xen Project Source Code
Primary ways to get the Xen Project source code are:
- Release Tarballs: Latest stable release can be downloaded from here as tarball.
- Git: This is the preferred way if you want to get latest unstable release. Just run the following command:
$ git clone git://xenbits.xen.org/xen.git
Before actual compiling you need to fulfill some requirements:
- Updated /sbin/installkernel: You need to update /sbin/installkernel so that it copies the kernel configuration upon a custom kernel install time. Edit the file by using following command:
# nano /sbin/installkernel
And then add these lines and save the file.
- Dependencies: Xen Project uses several external libraries and tools which can be installed using:
# apt-get install build-essential # apt-get install bcc bin86 gawk bridge-utils iproute libcurl3 libcurl4-openssl-dev bzip2 module-init-tools transfig tgif # apt-get install texinfo texlive-latex-base texlive-latex-recommended texlive-fonts-extra texlive-fonts-recommended pciutils-dev mercurial # apt-get install make gcc libc6-dev zlib1g-dev python python-dev python-twisted libncurses5-dev patch libvncserver-dev libsdl-dev libjpeg62-dev # apt-get install iasl libbz2-dev e2fslibs-dev git-core uuid-dev ocaml ocaml-findlib libx11-dev bison flex xz-utils libyajl-dev # apt-get install gettext libpixman-1-dev libaio-dev markdown pandoc libc6-dev-i386 libssl-dev
- Configure: It matches the libraries required by the program with those installed on the user’s computer to that program can compile successfully. Run:
Build & Install
To build all components run:
$ make dist
After successfully compiling you can install it by running:
# make install
Linux grub2 update
To make sure grub2 pick up your new Xen hypervisor update grub by running:
And that’s about it. You can also refer to original guide, for more generalized instructions and information.