Archive for September, 2008

How to create an ubuntu server DomU using the normal ubuntu install procedure

Wednesday, September 10th, 2008

How to create an ubuntu server DomU using the normal ubuntu install procedure(64 bit only, 32 bit maybe soon.). It may work or it may not, no guarantees. It did for me.

First download the kernel and the initrd and the ubuntu-8.04.1-server-amd64.iso file from .

Create the xen config file similar to this one paying attention to all the paths.

Xen Config File:

memory = 256
name = “ubuntutemp”
disk = ['phy:/dev/filevg/ubuntutemp,hda,w','file:/mnt/filelv/Downloads/ISOs/ubuntu-8.04.1-server-amd64.iso,sda:cdrom,r']
kernel = ‘/xen/ubuntutemp/kernel-xen’
ramdisk = ‘/xen/ubuntutemp/initrd-xen’
vif  = [ '' ]

Fire up the DomU

xm create -c ubuntu.cfg

Setting up the locale settings will be 1st thing.

Then you will be asked:

Load CD-ROM drivers from a driver floppy? say no
Manually select a CD-ROM module and device? say yes
Select “none”
enter /dev/sda
continue without kernel modules.
Ignore “Could not get identity of device” errors, you will get a few, otherwise continue with the setup normally.

Make sure you have a valid internet connection configured because this will be needed later on in the process

Continue the setup until you get the installation complete dialog that says this:

┌│                         Installation complete                         │
││ Installation is complete, so it is time to boot into your new system. │
││ Make sure to remove the installation media (CD-ROM, floppies), so     │
││ that you boot into the new system rather than restarting the          │
││ installation.                                                         │
││                                                                       │
└│     <Go Back>                                          <Continue>     │

select continue. Select go back.

and from the next dialog select “execute a shell” and select continue.

Then issue the following commands to “xenify” the setup.

chroot /target /bin/bash
aptitude install -y linux-image-xen ##this is where you need your internet connection
sed -ibak ’s/generic/xen/g’ /boot/grub/menu.lst
sed -ibak ’s/splash/console=xvc0/g’ /boot/grub/menu.lst
mv /etc/event.d/tty1 /etc/event.d/xvc0
rm /etc/event.d/tty*
sed -i ’s/tty1/xvc0/g’ /etc/event.d/xvc0

Probably best to do these 1 by 1, its important every single command finishes.

Now we need to edit the configuration file to this:

memory = 256
name = “ubuntutemp”
disk = ['phy:/dev/filevg/ubuntutemp,hda,w','file:/mnt/filelv/Downloads/ISOs/ubuntu-8.04.1-server-amd64.iso,sda:cdrom,r']
#kernel = ‘/xen/ubuntutemp/kernel-xen’
#ramdisk = ‘/xen/ubuntutemp/initrd-xen’
vif  = [ '' ]

Obviously changing paths as needed.

And then fire up the machine again

xm create -c ubuntu.cfg

After a short while you should be presented with a lovely login dialog:

Ubuntu 8.04.1 ubuntu xvc0

ubuntu login:

And thats it, you have a fully functioning ubuntu DomU using the starndard ubuntu server setup procedure. FYI LVM setups have been tested and worked too, Encrypted LVM hasnt been tested.

Installing an ubuntu DomU using the native installer

Wednesday, September 10th, 2008

So I wanted to install an ubuntu DomU in my Centos5 Dom0 which proved to be quite the task due to the lack of debootstrap. So an idea was to get the ubuntu install initrd and modify it so it would work with Xen so the installer would work like it would in a normal system. I succeded to an extent, with a few minor operations at the end of the install its reletively simple to install ubuntu using this system.

I’ll post my intructions and kernel/initrd later.

Copyright © 2019 All Rights Reserved.
No computers were harmed in the 0.174 seconds it took to produce this page.