Ubuntu 10.04 domU: Difference between revisions

From Xen
Jump to navigationJump to search
m (Removed superfluous <nowiki></nowiki> tag pairs.)
No edit summary
Line 95: Line 95:
[[Category:Beginners]]
[[Category:Beginners]]
[[Category:Tutorial]]
[[Category:Tutorial]]
[[Category:Ubuntu]]
[[Category:Guest Install]]

Revision as of 13:30, 26 March 2012

Installing Ubuntu 10.04 LTS (Lucid Lynx) Xen PV guest using the Ubuntu text installer

Ubuntu 10.04 can be installed as Xen PV guest using the default text-based installer included in the Ubuntu distribution.

First create a new LVM volume to store the guest virtual disk:


[root@f13 ~]# lvcreate -nubuntu01 -L20G /dev/vg_f13
  Logical volume "ubuntu01" created

Then download the official Ubuntu Xen guest configuration file:


[root@f13 ubuntu]# wget http://fi.archive.ubuntu.com/ubuntu/dists/lucid/main/installer-amd64/current/images/netboot/xen/xm-debian.cfg
--2010-09-05 01:53:38--  http://fi.archive.ubuntu.com/ubuntu/dists/lucid/main/installer-amd64/current/images/netboot/xen/xm-debian.cfg
Resolving fi.archive.ubuntu.com... 130.230.54.102, 2001:708:310:54::102
Connecting to fi.archive.ubuntu.com|130.230.54.102|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 7618 (7.4K) [text/plain]
Saving to: “xm-debian.cfg”
100%[======================================>] 7,618       --.-K/s   in 0.008s
2010-09-05 01:53:38 (911 KB/s) - “xm-debian.cfg” saved [7618/7618]

And rename it to "ubuntu01.cfg":


[root@f13 ubuntu]# mv xm-debian.cfg ubuntu01.cfg
[root@f13 ubuntu]#

Then edit "ubuntu01.cfg" with your favourite text editor and make it look like this (among other stuff in it):


memory = 1024
name = "ubuntu01"
vcpus = 1
vif = ['mac=00:16:36:64:3d:f3,bridge=virbr0']
disk = ['phy:vg_f13/ubuntu01,xvda,w']

Modify the mac address to be unique.

Then find a line in "ubuntu01.cfg" that says "bootloader=pygrub" and add proper path ("/usr/bin/pygrub") to it:


if not xm_vars.env.get('install'):
    bootloader="/usr/bin/pygrub"
else:

Already modified configuration file is available as a reference from: http://pasik.reaktio.net/fedora/f13xen4tutorial/ubuntu01.cfg .

Then start the Ubuntu installer:


xm create -f ubuntu01.cfg -c install=true
install-kernel="http://fi.archive.ubuntu.com/ubuntu/dists/lucid/main/installer-amd64/current/images/netboot/xen/vmlinuz"
install-ramdisk="http://fi.archive.ubuntu.com/ubuntu/dists/lucid/main/installer-amd64/current/images/netboot/xen/initrd.gz"
install-mirror="http://fi.archive.ubuntu.com/ubuntu"

All of the above command needs to be on a single line. Replace the mirror site URLs with your local mirror.

Ubuntu 10.04 text installer starts:

ubuntu01.png

Install as usual. Choose DHCP for networking.

ubuntu02.png

ubuntu03.png

ubuntu04.png

ubuntu05.png

When the installation finishes the Ubuntu guest VM will shut down.

After installation you can start the Ubuntu guest like this:


xm create -f ubuntu01.cfg -c

First you'll see the pygrub menu which allows you to choose which Ubuntu kernel to boot, and then you'll get to the normal Xen PV guest text console and see the Ubuntu kernel booting. You can exit from the console by pressing ctrl+] or ctrl+5.