mercoledì 7 maggio 2014

XenServer 6.2 and Ubuntu 14.04 LTS

I'm currently using XenServer 6.1/6.2 on my production servers to manage my VM. I mostly need Linux on server side and I choose Ubuntu Server as distribution for many reasons, that are out of scope of this post ;-)

Anyway.. anyone knows that for production servers running Ubuntu it's better to use an LTS release: 10.04, 12.04 and, from a bit less than one month, 14.04

Today I need to test a new service and I decide to start testing 14.04 release. I download the .iso and create the new VM inside XenCenter when.. wait! Of course there's no template for 14.04 but only for 12.04!
A fast search with Google point me to this Ubuntu forum topic, which has the right solution.
Well, there are two solutions.. one that requires a manual change to the Ubuntu installation process and one that requires a (small) change to XenServer tools
I've decided to use the first one, and here it is:

  • install Ubuntu as usual, but stop before installing grub
  • choose "Back" and, from the menu, choose open a shell
  • now enter the following commands
chroot /target
apt-get install grub
grub-install /dev/xvda
update-grub


  • the last command require a confirm for creating menu.lst
  • quit the shell by entering "exit" command twice
What we've done is simply reverting from grub2 to the "old" grub, which is correctly supported by pygrub provided with this version of XenServer.

Now you should be back to the installation menu. Skip the "Install grub" option and choose to skip bootloader installation. There will be a warning but don't worry, the installer doesn't know it but you already install the bootloader manually.
The installation procedure requires a few more steps to complete but you're done.
Once the last step is completed, the VM will reboot and Ubuntu 14.04 LTS will boot perfectly with XenServer 6.2

Please also note that now you need to install the guest utilities. Again 14.04 is not recognized by the install script but this can be easily bypassed by entering two commands:

sudo mount /dev/xvdd /media/cdrom
sudo dpkg -i /media/cdrom/Linux/xe-guest-utilities_6.1.0-1031_amd64.deb

That's all!