Comments on XEN On An Ubuntu Hardy Heron (8.04) Server System (amd64) - High Performance

XEN On An Ubuntu Hardy Heron (8.04) Server System (amd64) - High Performance This tutorial provides step-by-step instructions on how to install XEN on an Ubuntu Hardy Heron (8.04)  Server System (amd64) without compromising on disk I/O and network throughput. You can find all the software used here in the Ubuntu repositories, so no external files or source compilation are required.

8 Comment(s)

Add comment

Please register in our forum first to comment.

Comments

By:

Hello,

Thanks for this great article, it's simple and efficient but I have some corrections and advices.

I would have done the:

# chroot /mnt /bin/bash

After these 4 commands (so I don't need to open an another terminal:

# cp /etc/resolv.conf /mnt/etc/resolv.conf

# cp /etc/network/interface /mnt/network/interface

# cp /etc/apt/source.list /mnt/etc/apt/sources.list

# cp -R /lib/modules/2.6.24-17-xen/* /mnt/lib/modules/2.6.24-17-xen/

Also, there are some typos (/etc/network/interface should be /etc/network/interfaces with a final s, /etc/apt/source.list should be /etc/network/sourceS.list)

The commands I typed looked like this:

# cp /etc/resolv.conf /mnt/etc
# cp /etc/network/interfaces /mnt/etc/network
# cp /etc/apt/sources.list /mnt/etc/apt

Also to copy the modules I used:

# mkdir /mnt/lib/modules/`uname -r`
# cp -R /lib/modules/`uname -r`/* /mnt/lib/modules/`uname -r`/

 Instead of :

# cp -R /lib/modules/2.6.24-17-xen/* /mnt/lib/modules/2.6.24-17-xen/

 I'm wondering if after the chroot and apt-get update, when we are doing "apt-get upgrade" we aren't supposed to do an "apt-get dist-upgrade" , but the result is seems to be the same.

Finally, for the root filesystem of my vm, I haven't used a physical partition, I've used a file on my dom0's filesystem.

To do so, I have executed the following commands:

# mkdir /home/xen ; cd /home/xen

# dd if=/dev/zero of=hardyvm.root bs=10M count=100
# mkfs.ext3 hardyvm.root
# mount -o loop hardyvm.root /mnt/

This dd command creates a 1Gig file with no data.

Then in "/etc/xen/domu1.cfg" I have that line:

disk        = ['tap:aio:/home/xen/hardyvm.root,hda1,w',]

 Note the 'tap:aio:/home/xen/hardyvm.root' instead of 'phy:/dev/sda2,hda1'

Otherwise , this tutorial is great, simple and straightforward !

Thank you very much !

By:

Hello,

 Nice to see corrections from you.

 But still think, one should use "phy:" than "tap:"  as writing on physical disk is quite faster than writing on image-file. I already have experienced the same many a times on production environments.

 Thanks.

By: Anonymous

I dont have an AMD64 based computer.. what am I to do?

I get a series of error even before that!

like is xen running?

/mnt is empty?!

xen is not in my menu.lst file and is not loading at the boot up?!

I manually downloaded xen3.3.0.tar.gz and expanded it in to /xen3xyz  folder but i get a bunch of errors when i do ./install.sh!?

i moved it around still the same error...

thanks..

 

By:

Hi, I followed the howto, I was able to successfully start the domu1 virtual machine but I ran into problems.

First, networking doesnt work :( I can see eth0 but it has no ip address.

Second, when I type df -h I dont see /dev/hda1. Is that normal?

I tried Falko howto (with image file), networking was working and I could see the "partition" doing df -h but I would prefer to write directly on a partition instead of an image file. Did some quick benchmark with his method, drive performance using an image file was around 50% of the native drive performance which is quite bad....

 Also is there anything special I need to put in the domain config file with a dual cpu machine? I have dual (2x)  xeon 5140 processor (dual core) with HT enabled. How many VCPU i have available? 4, 8?

thanks for your help!

Marc

By:

Hi Marc,

Problem: First, networking doesn't work :( I can see eth0 but it has no ip address.

Ans:  You need to asign IP to domU either in /etc/network/interfaces or through /etc/xen/domu1.cfg file.

 

Problem: Second, when I type df -h I dont see /dev/hda1. Is that normal?

Ans: Yes it's normal. This is because we have define /dev/hda1 in /etc/fstab file of domU(s). You can spesify /dev/sda1 as well. But don't forget to change /etc/xen/domu1.cfg file accordingly.

-- Hope this clears your doubts.

 

By: Anonymous

This is really a great tutorial.

I do however have the following questions:

  1. I have 5 public addresses for the physical server and I would like to use one of them for domu1 and another one for domu2. Is this possible or should I other IPs
  2. how can I install on domu2 another OS like windows or any non linux OS

Thank you

By: Boris

This posting deals with utilizing same image device for loading HVM and PV Ubuntu Hardy DomUs at Ubuntu Hardy Dom0 (2.6.24-21-xen #1 SMP Mon Aug 25 18:56:44 UTC 2008 x86_64 GNU/Linux). This approach allows to avoid traditional "debootstrap" procedure as well as taking a long time "apt-get install ubuntu_desktop", what is, actually, 400 MB download. It also provides a workaround to get Gnome Desktop working stable at Ubuntu PV DomU no matter on Xen Release (>=3.1.2) and OS (Solaris,Linux) running at Dom0. Install Ubuntu Hardy HVM DomU via hvm-profile.

http://librenix.com/?inode=12795

By: Jahn

Would be very interesting if there were a tutorial on how to install a Windows Guest on Ubuntu Xen!