Unbreakable Xen
This article summarizes the major steps to install Unbreakable Linux as DomU using a Debian Etch / Xen 3.1.0 Dom0 as described in this Xen article.
Sommaire
Foreword
I wanted to install an Unbreakable Linux Enterprise Linux 5 virtual machine on top of my Xen 3.1.0 hypervisor with a Debian Etch Dom0.
I also want to run a para-virtualized machine (PVM), not a true virtualized machine (HVM).
I am unfamiliar with Unbreakable Linux, and I could not find a clear guidance on how to proceed.
Most of the available articles on the web are describing homogeneous environments where the Dom0 and the DomU machines are running the same Linux flavour.
The rpm-based distributions are using the Virtual Machine Manager which is not available for Debian, so this is not an option.
Xen-tools is rpm-aware, and is based on rpmstrap. No support for Unbreakable Linux or RedHat though...
Remains the manual option, which is relatively easy, but not very well documented; so hopefully this article will help the lost souls on the same path...
Package repository
There is no way to install directly from the CD-ROM or ISO in PVM, so you have to copy the files somewhere.
The installer can get its packages in several way, but the easiest in my view is via the web. So we copy the content the 5 distribution CDs on a web server. It can be done on the Dom0 system, but it does not really matter.
So we assume that the full distribution is available via http://<server>/unbreakable/
Kernel
To boot our virtual machine, we need a xenified installation kernel. This kernel is available on the Enterprise-R5-GA-Server-i386-disc1.iso CD or, more easily, on our new repository!
Code: shell |
mkdir /boot/unbreakable-xen cd /boot/unbreakable-xen wget http://<server>/unbreakable/images/xen/vmlinuz wget http://<server>/unbreakable/images/xen/initrd.img |
Disk allocation
We use a logical volume to allocate disk space for the virtual machine:
Code: shell |
lvcreate -L 50000 -n unbreakable vgDomU |
It will be used as Disk Image by the VM.
Xen DomU Configuration file
This is a minimal configuration file:
Fichier: /etc/xen/unbreakable-install.cfg |
# -*- mode: python; -*- #============================================================================ # Python configuration setup for 'xm create'. # This script sets the parameters used when a domain is created using 'xm create'. # You use a separate script for each domain you want to create, or # you can set the parameters for the domain on the xm command line. #============================================================================ #---------------------------------------------------------------------------- # Kernel image file. kernel = "/boot/unbreakable/vmlinuz" # Optional ramdisk. ramdisk = "/boot/unbreakable/initrd.img" # Initial memory allocation (in megabytes) for the new domain. memory = 256 # A name for your domain. All domains must have different names. name = "unbreakable" #---------------------------------------------------------------------------- # Define network interfaces. vif = [ 'ip=xxx.xxx.xxx.xxx,bridge=xenbr0' ] #---------------------------------------------------------------------------- # Define the disk devices you want the domain to have access to, and # what you want them accessible as. # Each disk entry is of the form phy:UNAME,DEV,MODE # where UNAME is the device, DEV is the device name the domain will see, # and MODE is r for read-only, w for read-write. disk = [ 'phy:/dev/vgDomU/unbreakable,xvda,w' ] #============================================================================ |
Starting the installation
We just create the virtual machine:
Code: shell |
xm create -c /etc/xen/unbreakable-install.cfg |
The system will boot, and when it asks for the Installation Method, choose HTTP.
You will have to enter the network configuration (IP, ...) as well as the URL of package repository.
The machine will find the packages and proceed with the installation like on a bare metal system.
As we will use pygrub later on, we need to configure grub (just accept all defaults).