Bashton Blog

TAG | ubuntu

As pretty much always with Linux there’s more than one way to do this, but here’s how I got a nicely working para-virtualized Ubuntu Hardy domU running under a CentOS 5.2 dom0:

  • Install hardy under an HVM using the standard ISO
  • Boot into your new hardy install and run sudo apt-get install linux-image-xen (make sure you have universe enabled)
  • Add appropriate settings to your /boot/grub/menu.lst – here’s what I added:


title Ubuntu 8.04.1, kernel 2.6.24-19-xen
root (hd0,0)
kernel /vmlinuz-2.6.24-19-xen root=/dev/mapper/dsk-root ro
initrd /initrd.img-2.6.24-19-xen

  • Add a console on xvc0: sed -e 's/tty1/xvc0/' /etc/event.d/tty1 | sudo tee /etc/event.d/xvc0
  • Power off your Ubuntu VM
  • On your CentOS dom0, alter the Xen VM configuration file to boot using pygrub, very basic example below:


bootloader = '/usr/bin/pygrub'
memory = 1024
name = "ubuntu-test"
vif = [ '' ]
disk = [ 'phy:/dev/san1/ubuntu-test,xvda1,w']

  • Restart your Hardy VM and enjoy massively improved performance

One thing missing from the para-virtualized VM is VNC support – you have to use the console via the ‘xm console’ command.

The procedure should be similar for Citrix XenServer, although it will involve some messing with the xe vm-param-set command rather than editing the config file.  When I have a chance I’ll document this too.

Update, 30/9/08:

To enable a VNC console, do the following as well as the above:

  • Add the framebuffer drivers into the initramfs

echo "fbcon" | sudo tee -a /etc/initramfs-tools/modules
echo "vga16fb" | sudo tee -a /etc/initramfs-tools/modules
sudo sed -ie 's/^blacklist vga16fb$/#&/' /etc/modprobe.d/blacklist-framebuffer

  • Re-generate the initramfs

sudo update-initramfs -u -k all

  • Alter your grub menu.lst to include the boot options console=tty1 vga=normal (best done via the defoptions line, I tend to remove quiet and splash from here too)

Reboot, and you can now use a VNC console as well as the Xen xm console command.

, , ,

I’ve just put up an long-ish article I’ve written comparing five different server distributions.  I fully realise that by doing so I’m opening myself up to hundreds of flames from outraged fans of <insert OS here>, all complaining that I’ve treated their pet distro unfairly.

Given that I’ll probably be accused of bias anyway, I better declare mine: the server that is serving you this page runs Ubuntu, as does the one running the main Bashton site. Many of our internal-facing servers run CentOS. My desktop runs Ubuntu, and my laptop runs Debian. Other staff have their own bias of course (particularly those who are Debian developers..), but as it was just me writing the article I don’t see that as relevant.

Please make your comments here and hopefully we can start some form of a useful debate, rather than the ‘distro X is the best’ discussions these things usually descend into.

, , , , , ,

Find it!

Theme Design by devolux.nh2.me