Installing Ubuntu Server 10.04 (32bit and 64bit) LTS
Ubuntu server 10.04(32bit and 64bit) LTS
This blog provides details on how to install Ubuntu on XenServer version 5.6.
This requires that the XenServer and the guest network have access to the internet; this is required because this is actually a network install and no CD ISO is required.
Listed below is an outline of the overall process:
1. Copy makeubuntu.sh script to the Pool Master (Download Script)
2. Execute makeubuntu.sh script to create Ubuntu Templates
3. Create an Ubuntu VM with the new templates.
4. Perform install and reboot.
5. Install XenTools.
1. Copy makeubuntu.sh to Master
Using WinSCP (or any SFTP client), copy makeubuntu.sh to the /root directory on the Pool Master.

2. Execute makeubuntu.sh to create the Ubuntu templates
In XenCenter, open the console tab of the master to get a bash prompt.Change the current working directory to /root by executing "cd ~".
Then make the "makeubuntu.sh" script executable by issuing "chmod +x makeubuntu.sh"
Execute the script by issuing "./makeubuntu.sh".

Two new VM templates will now have been created,, Ubuntu Server 32bit and 64bit
3. Create a new Virtual Machine from a new Ubuntu template.
Using the "New VM" wizard, create a new virtual machine using one of the new Ubuntu templates.



Notice that, by default all fields are pre-populated.
Because XenServer 5.6 does not support ext4, we tell the Ubuntu installer to use ext3 instead (see Advanced OS boot parameters).
Continue the wizard steps as normal.
After the wizard has completed, start the VM.
4. Perform Install and reboot.
The first boot will be the standard Ubuntu server installer.

If you want to get started quickly then just choose the default options. At this point this is a standard Ubuntu network installation.
Points to consider:
- Your VM needs network access to an Ubuntu mirror.
- The installer will pull down a large amount of data from the mirror to perform the install.
- LVM in the guest has been successfully achieved, soft raid has not been attempted.
- Do not use ext4 as the VM will not be able to boot. The installer will use ext3 by default. When the installer is finished, reboot.#
When the installer is finished, reboot.

After the reboot of the VM, login to your new Ubuntu operating system.

5. Install XenTools
Installing XenTools is very easy; attach the XenTools cdrom by selecting VM-> Install XenServer Tools.
Then become root by issuing "sudo su", then enter your password.
Mount the iso by issuing "mount /dev/cdrom /mnt".
If your Ubuntu install is i386, issue:
"dpkg -i /mnt/Linux/xe-guest-utilities*i386.deb"
On amd64:
"dpkg -i /mnt/Linux/xe-guest-utilities*amd64.deb"
Un-mount the cdrom by issuing "umount /mnt"

You will then notice that Suspend and XenMotion functionality will be enabled.
This concludes the steps needed to install a fully functional Ubuntu 10.04 server VM on XenServer 5.6.
Disclaimer
Please note the following supportability disclaimer: Only OSs listed in the XenServer Virtual Machine Installation Guide are supported by Citrix Technical Support. The OS within this and related blogs are not supported and are installed at the users own risk.
Comments (15)
Sep 29, 2010
Edward Milgram says:
Great article Anthony!!!. I am no Linux expert so I had to research how to sol...Great article Anthony!!!.
I am no Linux expert so I had to research how to solve 2 issues I found with my local installation. I wanted to share what I had to do in order to create the templates:
1) When you copy a file from DOS/Windows to Linux sometimes there are issues with the DOS based \r\n control character sequence. I fixed this by running the command:
"sed -i 's/\r$//' makeubuntu.sh"
2) I was unable to execute the script using "./makeubuntu.sh" so I executed it instead using:
"sh makeubuntu.sh"
Sep 29, 2010
Dejan Markovic says:
Hi, I've followed the tutorial and it's working fine. After that I've tried to ...Hi,
I've followed the tutorial and it's working fine. After that I've tried to delete the template and I'm facing a problem: I could not delete it.
I've tried :
xe template-uninstall template-uuid=<UUID>
and also:
xe template-param-set is-a-template=false uuid=<UUID> && xe vm-uninstall uuid=<UUID> force=true
without success.
Did someone have a clue for that?
May 12, 2011
Jouni Uuksulainen says:
I had a hard time deleting these too, but I finally got them removed like this: ...I had a hard time deleting these too, but I finally got them removed like this:
xe template-param-set is-a-template=false uuid=<UUID>
xe template-param-remove param-name=other-config param-key=default_template uuid=<UUID>
xe template-uninstall template-uuid=<UUID>
Sep 30, 2010
Anonymous says:
Anyone know how to get ubuntu desktop to work??? I installed the server version...Anyone know how to get ubuntu desktop to work???
I installed the server version great, and included the ubuntu desktop as a package to install. But it still starts into cli mode, and I am getting an error when I try "startx"
PS: I saw Anthony Francis mention that Ubuntu is now on their roadmap (anyone know if that will include Server and Desktop and do they have any time frame?)
Oct 22, 2010
Anonymous says:
If you see the Demo VM, it seems install gdm and Xvnc4 server, and configures gd...If you see the Demo VM, it seems install gdm and Xvnc4 server, and configures gdm to start Xvnc4 on port 5900 instead of standard X. Try it out.
Oct 05, 2010
Anonymous says:
Any tips on installing 10.10 now that its out? Is it as simple as changing the ...Any tips on installing 10.10 now that its out? Is it as simple as changing the pointer to the install source in the template creating script to point to maverick instead of lucid?
Oct 05, 2010
Alberto Matus says:
I'd suggest sticking to Lucid ... Long Term Support?? ehh ... Anyhow I installed...I'd suggest sticking to Lucid ... Long Term Support?? ehh ... Anyhow I installed it using the "other" option on the template list, 32 bit server seems to be working fine. I don't know if i might run into issues in the future. Would you guys recommend it ? Will be running atleast 4 virtual servers.
Oct 27, 2010
Darren Covell says:
Did make sure your XENSERVER resolves addresses check your /etc/resolv.confDid make sure your XENSERVER resolves addresses check your /etc/resolv.conf
Nov 23, 2010
Anonymous says:
Thanks for your great job, i just changed URLs in my templates. My experi...Thanks for your great job, i just changed URLs in my templates.
My experience with Lucid LTS Server (base install + SSH server) in PV Mode in a XenServer pool 5.6.0 :
- System installation OK
- Xen-tools installation OK
- Suspend works fine but resume doesn't restore network link, it looks like link stays down. "ifdown + ifup" sometimes solve the problem but not always. I tried to resume either on the same server or on a different server in the pool. I also tried with a dedicated network interface in the pool. The same problem occurs each time.
- XenMotion (live migration in the pool) seems to work fine but at the last time - when 'logs' says it should be ok - it seems to freeze : no console access, no network, can't reboot nor shutdown cleanly
Thanks for your own feedbacks.
--
svincendeau
Stopping xe daemon: OK
Checking for running unattended-upgrades: * Asking all remaining processes to terminate...
Dec 21, 2010
Anonymous says:
Thanks Very much for this How to and some of the issues arising. It has helped u...Thanks Very much for this How to and some of the issues arising. It has helped us tremendously. Thanks.
Dec 22, 2010
Anonymous says:
anybody have a similar solution for xenserver 5.5 ? Regardsanybody have a similar solution for xenserver 5.5 ?
Regards
Feb 24, 2011
Anonymous says:
What we need to check /etc/resolv.conf? Appreciate for your clarificationWhat we need to check /etc/resolv.conf? Appreciate for your clarification
Jul 11, 2011
Michael Snowden says:
resolve.conf is the file that points to DNS servers for host name resolution. Ju...resolve.conf is the file that points to DNS servers for host name resolution. Just make sure that the is that you have an entry in there pointing to the dns server in your LAN. Example:
nameserver 192.168.1.1
Also as a suggestion, instead of trying to ssh the script into your pool master. I feel that a better approach should be to use wget from your pool master to get the makeubuntu.sh script by just copying and pasting the following command:
After it downloads it will have a weird file name. Just rename it to makeubuntu.sh and then make the script executable like instructed in step 2.
Jul 11, 2011
Michael Snowden says:
One thing that I do need help with though is trying to get X started. I go throu...One thing that I do need help with though is trying to get X started. I go through and get Xorg installed no problem, but when I try and start X, Xorg crashes with the following error:
------------------------------------------------------
Build Operating System: Linux 2.6.24-28-server x86_64 Ubuntu
Current Operating System: Linux ubuntu-template-changeMe 2.6.32-32-generic #62-Ubuntu SMP Wed Apr 20 21:52:38 UTC 2011 x86_64
Kernel command line: root=/dev/mapper/ubuntu-
template-changeMe-root ro console=hvc0 splash quiet – quiet console=hvc0 partman/default_filesystem=ext3Build Date: 08 March 2011 08:22:34AM
xorg-server 2:1.7.6-2ubuntu7.6 (For technical support please see http://www.ubuntu.com/support)
Current version of pixman: 0.16.4
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Mon Jul 11 02:05:44 2011
(==) Using config directory: "/usr/lib/X11/xorg.conf.d"
Primary device is not PCI
(EE) open /dev/fb0: No such file or directory
(EE) No devices detected.
Fatal server error:
no screens found
Please consult the The X.Org Foundation support
to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Mon Jul 11 02:05:44 2011
(==) Using config directory: "/usr/lib/X11/xorg.conf.d"
Primary device is not PCI
(EE) open /dev/fb0: No such file or directory
(EE) No devices detected.
Fatal server error:
no screens found
Please consult the The X.Org Foundation support
at http://wiki.x.org
for help.
Please also check the log file at "/var/log/Xorg.0.log" for additional information.
ddxSigGiveUp: Closing log
giving up.
xinit: No such file or directory (errno 2): unable to connect to X server
xinit: No such process (errno 3): Server error
-----------------------------------------------------------
Is it just not possible to startx under hvc0?
Aug 02, 2011
john Hart says:
Thanks I know this is an old post however I just want to say thanks Antho...Thanks
I know this is an old post however I just want to say thanks Anthony for such an easy to follow article, Well Done.
I have tried to follow numerous other posts here and in other forums on installing the xenserver tools (PV) with no joy, but I'm smiling now.
Any chance you can do an article on how to get the command "startx" to work? or maybe how to connect to Ubuntu Lucid Lynx 10.04 (32-bit) with VNC so I can use a GUI with some privileges remotely, and or from the consol (remote desktop)?
it might help quit a few people : )
Thanks
... struth!
PS. On a another note have managed to install xen tools and connect with VNC to an install of "Open SUSE 11.4 but I cannot run yast from the GUI with VNC, it asks for my credentials then nothing? could be because I am using GNOME?