First, make a new template on your Dom0 xen host:
xe template-list name-label="Ubuntu Lucid Lynx 10.04 (64-bit)" --minimal xe vm-clone uuid=[UUID from step 1 here] new-name-label="Ubuntu Precise Pangolin 12.04 (64-bit)" xe template-param-set other-config:default_template=true other-config:debian-release=precise uuid=[UUID from step 2 here]
Create a new VM in XenCenter and choose the VM template you just created
Enter the following as install URL:
During Ubuntu Server install create a separate /boot partition with the size of 500Mb and set the type to ext3 as pygrub does not support ext4 very well.
After installation is complete, log in and make yourself root:
Next, install kernel with virtual support and remove default kernel:
apt-get install linux-virtual linux-image-virtual linux-headers-virtual dpkg -l | grep generic apt-get remove [all linux*generic packages from last command]
Mount xs-tools to your VM dvd drive in XenCenter and install xen guest tools for VM monitoring:
mount /dev/xvdd /mnt cd /mnt/Linux dpkg -i *amd64.deb
Edit /etc/fstab and add nobarrier option to every virtual disk, example /etc/fstab:
# /etc/fstab: static file system information. # # Use 'blkid' to print the universally unique identifier for a # device; this may be used with UUID= as a more robust way to name devices # that works even if disks are added and removed. See fstab(5). # # proc /proc proc nodev,noexec,nosuid 0 0 # / was on /dev/xvda5 during installation UUID=a4588f98-9db1-4e85-adf4-e03a6c5202d4 / ext3 nobarrier 0 1 # /boot was on /dev/xvda1 during installation UUID=12c79a36-e3b8-49c4-8d20-5d8c302c7faf /boot ext3 nobarrier 0 2 # /home was on /dev/xvdb1 during installation UUID=7558d15d-8c4b-4d50-8872-72fd2974c946 /home ext3 nobarrier 0 2 # swap was on /dev/xvdb5 during installation UUID=cb9aef04-d7ca-4eb9-940c-87d986729169 none swap sw 0 0
That should do it, have fun with Ubuntu Server 12.04.
26 thoughts on “Install Ubuntu 12.04 Server on Citrix XenServer 6.0.2”
Thank you for this round up! May I ask what settings and mount options you used for the boot partition?`Thank you!
Damn! I’m too dumb to read :o)
Getting an error when attempting to mount xen-tools.iso. Says iso9660 error. any idea what causes this and how to rectify ?
you should mount the xen-tools cd before removing the linux*generic or reboot the vm to get the iso9660.ko up from the linux*virtual.
I installed Ubuntu 12.04 and xs-tools completely. But I can’t see ipaddress on XenCenter. Can you see it??
If you can’t see the IP in XenCenter, then the XenTools probably haven’t installed properly. Go and reinstall them and see if that fixes it. This guide worked for me! 🙂
Is it possible to do this in a way that will allow installation from a CD ISO? I’m trying to install Mythbuntu which I have a ISO file for but I don’t think there’s a URL available for it to install from (or if there is I don’t have any idea what it is).
I have tried your instructions about a month ago and installed without any problem 12.04. But today after finishing a new installation a get this error
Traceback (most recent call last): – File “/usr/bin/pygrub”, line 808, in ? – fs = fsimage.open(file, part_offs, bootfsoptions) – IOError: Errno 95 Operation not supported
Doesn’t seem to work with me. VM-CLONE doesn’t see the UUID’s of the templates, only the VM’s.
This is a great walk through. Some things to note – if for some reason you want to delete your template later, you’ll need to remove the default_template line or you’ll get an error
xe template-param-remove uuid=VM-UUID param-name=other-config param-key=default_template
I installed as per instructions and I got a read-only root file system. Anyone know what is going on?
Did you add the nobarrier option in your fstab
My options in fstab :”noatime,nodiratime,errors=remount-ro,barrier=0″
Great walk-through. I upgraded some VM’s from 10.04 to 12.04 recently, and the nobarrier option in fstab was one of the solutions I found. Ran into another today, which is the grub-legacy-ec2 package, which maintains a /boot/grub/menu.lst for pygrub parallel to grub2’s /boot/grub/grub.cfg. Thanks to this package I won’t have to edit the grub.cfg or files in /etc/grub.d to get pygrub to boot.
FYI, for me I had to reboot before mounting the tools cd. It was complaining about the iso format. Once I rebooted, I could continue on.
Does XenServer support GUI screen showing of Ubuntu 12.04? I ask this because I followed this procedure and installed the GUI, but i continue having just the terminal.
We’re trying to import Ubuntu 12.04 OVF created with VmWare. I only get command-line terminal when it boots and the file system is read-only. I’ve done this with Ubuntu 10.04 before and it worked fine.
Came across this page and want to try instructions from above link, however, only see steps for creating a new VM. Is there a way to import a 12.04 VM?
Thanks in advance for any suggestions…
I have this problem:
root@geocr:~# apt-get install linux-virtual linux-image-virtual linux-headers-virtual
Reading package lists… Done
Building dependency tree
Reading state information… Done
linux-headers-virtual is already the newest version.
linux-image-virtual is already the newest version.
linux-virtual is already the newest version.
You might want to run ‘apt-get -f install’ to correct these:
The following packages have unmet dependencies:
linux-image-virtual : Depends: linux-image-3.2.0-38-virtual but it is not going to be installed
E: Unmet dependencies. Try ‘apt-get -f install’ with no packages (or specify a solution).
root@geocr:~# apt-get -f install
Reading package lists… Done
Building dependency tree
Reading state information… Done
Correcting dependencies… Done
The following extra packages will be installed:
fdutils linux-doc-3.2.0 linux-source-3.2.0 linux-tools
The following NEW packages will be installed:
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
4 not fully installed or removed.
Need to get 0 B/12.3 MB of archives.
After this operation, 34.0 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
(Reading database … 58999 files and directories currently installed.)
Unpacking linux-image-3.2.0-38-virtual (from …/linux-image-3.2.0-38-virtual_3.2.0-38.61_amd64.deb) …
dpkg: error processing /var/cache/apt/archives/linux-image-3.2.0-38-virtual_3.2.0-38.61_amd64.deb (–unpack):
unable to create `/boot/config-3.2.0-38-virtual.dpkg-new’ (while processing `./boot/config-3.2.0-38-virtual’): Read-only file system
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.2.0-38-virtual /boot/vmlinuz-3.2.0-38-virtual
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.2.0-38-virtual /boot/vmlinuz-3.2.0-38-virtual
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)
How can I fix it?
Thanks for that little howto. Worked well for me.
thanks bro, help me alot, i got an issue with the uninstall of the kernel and the update of grub, i manage to install again
I got this error:
May 30, 2013 9:49:44 AM Error: Starting VM ‘mwright_ubuntu’ – Using to parse /grub/grub.cfg – WARNING:root:Unknown directive menuentry_id_option – WARNING:root:Unknown directive else – WARNING:root:Unknown directive menuentry_id_option – WARNING:root:Unknown directive export – WARNING:root:Unknown directive font – WARNING:root:Unknown directive else – WARNING:root:Unknown directive else – WARNING:root:Unknown directive font – WARNING:root:Unknown directive load_video – WARNING:root:Unknown directive terminal_output – WARNING:root:Unknown directive else – WARNING:root:Unknown directive else – WARNING:root:Unknown directive else – WARNING:root:Unknown directive else – WARNING:root:Unknown directive else – WARNING:root:Unknown directive export – WARNING:root:Unknown image directive recordfail – WARNING:root:Unknown image directive gfxmode – WARNING:root:Unknown image directive if – WARNING:root:Unknown image directive else – WARNING:root:Unknown image directive fi – WARNING:root:Unknown directive submenu – WARNING:root:Unknown image directive recordfail – WARNING:root:Unknown image directive gfxmode – WARNING:root:Unknown image directive if – WARNING:root:Unknown image directive else – WARNING:root:Unknown image directive fi – WARNING:root:Unknown image directive recordfail – WARNING:root:Unknown image directive if – WARNING:root:Unknown image directive else – WARNING:root:Unknown image directive fi – Traceback (most recent call last): – File “/usr/bin/pygrub”, line 850, in ? – raise RuntimeError, “Unable to find partition containing kernel” – RuntimeError: Unable to find partition containing kernel
Got the same error as above.
I was having trouble with this installation until I changed the installation URL from “http://archive.ubuntu.net/ubuntu/” to “http://us.archive.ubuntu.net/ubuntu/”.
It seems that you need to add your locale code to the beginning for the installation to function. The page you listed just displays the default Apache “It works!” page.