Well XenServer 5.6 FP1 beta is out. I decided to finally see what tickets I entered during the 5.6 beta for ubuntu support were added. Turns out they all were! However there is at least one new patch needed.
All the requested additions to XenServer for ubuntu support were added for the final release. This really helped with Grub2 support and easily switching an ubuntu box to PV mode. There has been a little change to the grub file since 10.04 that requires a patch to one of the python scripts. Once applied, switching the VM to PV mode is very easy. If you do not want to edit your python script then you will need to manually specify the kernel files using VM parameters in XS. Check my older posts for information on that.
- Create a new VM in XS and install ubuntu 10.10 server. I used the Windows 2008 64-bit template. Currently I have only tested with ext3. If you install SSH you will have access to the VM even if the console connection does not work.
- The console for the DomU in PV mode will be hvc0. You will need to tell getty to use this. Copy the existing tty1.conf and edit it to replace “tty1″ with “hvc0″.
sudo cp /etc/init/tty1.conf /etc/init/hvc0.conf sudo nano -w /etc/init/hvc0.conf
- Shutdown the VM.
- Add the needed support to pygrub for named partitions. See this debian bug. The file you are altering is /usr/lib/python2.4/site-packages/grub/GrubConf.py. The patch is so small that I just manually edited the script. Make sure to back up your original file. If you do not want to alter your GrubConf.py script, refer to my older posts to see how to manually specify the kernel.
- Retrieve the UUID for the VM. Assuming your VM is named “ubuntu10”:
xe vm-list name-label=ubuntu10 params=uuid
- Retrieve the VBD UUID for the storage attached to the VM.
xe vm-disk-list uuid=<UUID>
- Clear out the HVM boot policy.
xe vm-param-set uuid=<UUID> HVM-boot-policy=
- Set the PV bootloader to pygrub.
xe vm-param-set uuid=<UUID> PV-bootloader=pygrub
- Lastly, set the VBD for the VM to be bootable.
xe vbd-param-set uuid=<VBD UUID> bootable=true
- Boot the VM. Once you log in it will be time to install the XenTools. If you receive a message about finding two bootable volumes, see this post.
- Attach the xs-tools.iso to the VM and mount the image. For my install the cdrom showed up as sdd under /dev.
sudo mount /dev/sdd /mnt
- Install the XenServer tools. Make sure you use the proper file for your architecture (x86_64 or i386) is being installed.
- Unmount the iso image and then detach it in XenCenter. If it claims it is in use, skip to the next step.
sudo umount /mnt
- Reboot the VM to complete the XenTools installation.
I’ll be submitting the Debian bug to the FP1 bug list so hopefully it will make it into the final release. FP1 is based on Xen 3.4.2.