Difference between revisions of "Ubuntu 10.04 domU"

From Xen
(Blanked the page)
(Undo revision 5120 by OliverChick (Talk))
Line 1: Line 1:
  +
== 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:
  +
  +
  +
<pre>
  +
[root@f13 ~]# lvcreate -nubuntu01 -L20G /dev/vg_f13
  +
Logical volume "ubuntu01" created
  +
</pre>
  +
  +
Then download the official Ubuntu Xen guest configuration file:
  +
  +
  +
<pre>
  +
[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]
  +
</pre>
  +
  +
And rename it to "ubuntu01.cfg":
  +
  +
  +
<pre>
  +
[root@f13 ubuntu]# mv xm-debian.cfg ubuntu01.cfg
  +
[root@f13 ubuntu]#
  +
</pre>
  +
  +
Then edit "ubuntu01.cfg" with your favourite text editor and make it look like this (among other stuff in it):
  +
  +
  +
<pre>
  +
memory = 1024
  +
name = "ubuntu01"
  +
vcpus = 1
  +
vif = ['mac=00:16:36:64:3d:f3,bridge=virbr0']
  +
disk = ['phy:vg_f13/ubuntu01,xvda,w']
  +
</pre>
  +
  +
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:
  +
  +
  +
<pre>
  +
if not xm_vars.env.get('install'):
  +
bootloader="/usr/bin/pygrub"
  +
else:
  +
</pre>
  +
  +
Already modified configuration file is available as a reference from: http://pasik.reaktio.net/fedora/f13xen4tutorial/ubuntu01.cfg .
  +
  +
Then start the Ubuntu installer:
  +
  +
  +
<pre>
  +
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"
  +
</pre>
  +
  +
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:
  +
  +
http://pasik.reaktio.net/fedora/f13xen4tutorial/ubuntu01.png
  +
  +
Install as usual. Choose DHCP for networking.
  +
  +
http://pasik.reaktio.net/fedora/f13xen4tutorial/ubuntu02.png
  +
  +
http://pasik.reaktio.net/fedora/f13xen4tutorial/ubuntu03.png
  +
  +
http://pasik.reaktio.net/fedora/f13xen4tutorial/ubuntu04.png
  +
  +
http://pasik.reaktio.net/fedora/f13xen4tutorial/ubuntu05.png
  +
  +
When the installation finishes the Ubuntu guest VM will shut down.
  +
  +
After installation you can start the Ubuntu guest like this:
  +
  +
  +
<pre>
  +
xm create -f ubuntu01.cfg -c
  +
</pre>
  +
  +
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.
  +
[[Category:Beginners]]
  +
[[Category:Tutorial]]
  +
[[Category:Ubuntu]]
  +
[[Category:Guest Install]]

Revision as of 15:28, 24 September 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.