Difference between revisions of "Ubuntu 10.04 domU"

From Xen
(Split from Fedora 13 Xen 4 Tutorial)
 
(added an out-of-date warning adn like to ubuntu's page on this)
 
(6 intermediate revisions by 5 users not shown)
Line 1: Line 1:
  +
{{Info|This page is out of date. See https://help.ubuntu.com/community/Xen to install the latest version of Ubuntu as a Xen DomU.}}
  +
 
== Installing Ubuntu 10.04 LTS (Lucid Lynx) Xen PV guest using the Ubuntu text installer ==
 
== 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.
 
Ubuntu 10.04 can be installed as Xen PV guest using the default text-based installer included in the Ubuntu distribution.
Line 5: Line 7:
   
   
<pre><nowiki>
+
<pre>
 
[root@f13 ~]# lvcreate -nubuntu01 -L20G /dev/vg_f13
 
[root@f13 ~]# lvcreate -nubuntu01 -L20G /dev/vg_f13
 
Logical volume "ubuntu01" created
 
Logical volume "ubuntu01" created
</nowiki></pre>
+
</pre>
   
 
Then download the official Ubuntu Xen guest configuration file:
 
Then download the official Ubuntu Xen guest configuration file:
   
   
<pre><nowiki>
+
<pre>
 
[root@f13 ubuntu]# wget http://fi.archive.ubuntu.com/ubuntu/dists/lucid/main/installer-amd64/current/images/netboot/xen/xm-debian.cfg
 
[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
 
--2010-09-05 01:53:38-- http://fi.archive.ubuntu.com/ubuntu/dists/lucid/main/installer-amd64/current/images/netboot/xen/xm-debian.cfg
Line 23: Line 25:
 
100%[======================================>] 7,618 --.-K/s in 0.008s
 
100%[======================================>] 7,618 --.-K/s in 0.008s
 
2010-09-05 01:53:38 (911 KB/s) - “xm-debian.cfg” saved [7618/7618]
 
2010-09-05 01:53:38 (911 KB/s) - “xm-debian.cfg” saved [7618/7618]
</nowiki></pre>
+
</pre>
   
 
And rename it to "ubuntu01.cfg":
 
And rename it to "ubuntu01.cfg":
   
   
<pre><nowiki>
+
<pre>
 
[root@f13 ubuntu]# mv xm-debian.cfg ubuntu01.cfg
 
[root@f13 ubuntu]# mv xm-debian.cfg ubuntu01.cfg
 
[root@f13 ubuntu]#
 
[root@f13 ubuntu]#
</nowiki></pre>
+
</pre>
   
 
Then edit "ubuntu01.cfg" with your favourite text editor and make it look like this (among other stuff in it):
 
Then edit "ubuntu01.cfg" with your favourite text editor and make it look like this (among other stuff in it):
   
   
<pre><nowiki>
+
<pre>
 
memory = 1024
 
memory = 1024
 
name = "ubuntu01"
 
name = "ubuntu01"
Line 42: Line 44:
 
vif = ['mac=00:16:36:64:3d:f3,bridge=virbr0']
 
vif = ['mac=00:16:36:64:3d:f3,bridge=virbr0']
 
disk = ['phy:vg_f13/ubuntu01,xvda,w']
 
disk = ['phy:vg_f13/ubuntu01,xvda,w']
</nowiki></pre>
+
</pre>
   
 
Modify the mac address to be unique.
 
Modify the mac address to be unique.
Line 49: Line 51:
   
   
<pre><nowiki>
+
<pre>
 
if not xm_vars.env.get('install'):
 
if not xm_vars.env.get('install'):
 
bootloader="/usr/bin/pygrub"
 
bootloader="/usr/bin/pygrub"
 
else:
 
else:
</nowiki></pre>
+
</pre>
   
 
Already modified configuration file is available as a reference from: http://pasik.reaktio.net/fedora/f13xen4tutorial/ubuntu01.cfg .
 
Already modified configuration file is available as a reference from: http://pasik.reaktio.net/fedora/f13xen4tutorial/ubuntu01.cfg .
Line 60: Line 62:
   
   
<pre><nowiki>
+
<pre>
 
xm create -f ubuntu01.cfg -c install=true
 
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-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-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"
 
install-mirror="http://fi.archive.ubuntu.com/ubuntu"
</nowiki></pre>
+
</pre>
   
 
All of the above command needs to be on a single line. Replace the mirror site URLs with your local mirror.
 
All of the above command needs to be on a single line. Replace the mirror site URLs with your local mirror.
Line 88: Line 90:
   
   
<pre><nowiki>
+
<pre>
 
xm create -f ubuntu01.cfg -c
 
xm create -f ubuntu01.cfg -c
</nowiki></pre>
+
</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.
 
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]]

Latest revision as of 15:31, 24 September 2012

Icon Info.png This page is out of date. See https://help.ubuntu.com/community/Xen to install the latest version of Ubuntu as a Xen DomU.


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.