Xen.org blog already hosted a very nice post by Ian Jackson, greatly explaining how useful xen-tools is for automatically installing Debian (and Debian-derived) VMs. Now, if this all happens on a Debian host, it is nice and easy, as getting
xen-tools is just a matter of
apt-get install-ing it. But what if your host machine runs something else, for instance, a copy of Fedora? As a matter of fact, starting from Fedora 16, Xen is quite easy to install and use on Fedora, making it interesting to cover this case too.
There is no
xen-tools RPM package, thus we need to go the good old way: download the sources, compile and install them. Luckily enough, this is not difficult at all, and this blog post will explain in details how to achieve it.
Installing Fedora and Xen
So, let’s assume that you just finished installing the new and shiny Spherical Cow. Official instructions and advice on that are available here. The first thing to do now is to install Xen there. This has become very simple these days; all that’s needed is the following (where an
# prompt means the command must be run as
# yum install xen
Followed by a reboot. Note that Xen will not be the default boot option, so you’ll need to make sure to select it from the GRUB2 menu. You can also make Xen the default by setting
GRUB_DEFAULT=saved in your
/etc/defaults/grub.conf and running the following:
# grub2-mkconfig -o /boot/grub2/grub.cfg # XEN=$(grep ^menuentry /boot/grub2/grub.cfg | cut -f2 -d"'" | tail -n1) # grub2-set-default $XEN
If the libvirt‘s services are needed too, some more packages must be installed, but this is out of the scope of this post. For more information on how to install Xen on Fedora, check the Fedora pages on Xen.org’s Wiki, in particular, this one: Fedora Host Installation.