Home

Xen + Ubuntu 8.04 Howto

  • May. 12th, 2008 at 7:25 PM
research, white shirt, apartment, Masters, ibm phd fellowship 2, ibm phd fellowship, tuxmasters, Todd, computer science, december, patty, clarkson, five long years, michigan, suit
NOTE: This is a work in progress

For details that I might be missing a good resource is:
http://howtoforge.com/ubuntu-8.04-server-install-xen-from-ubuntu-repositories

I will clean this up and do more testing when I have time

Any problems, questions leave a comment or post to the xen-users mailing list

Also, this is just proof of concept, in production I would recommend things like
LVM and network storage solutions like AoE, iSCSI, and DRDB.

Another NOTE: this is for amd64, there are also packages for i368


sudo apt-get remove network-manager
sudo gedit /etc/network/interfaces

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp


sudo /etc/init.d/network restart
sudo apt-get install ubuntu-xen-server
wget http://downloads.howtoforge.com/ubuntu_8.04_server_xen_from_repositories/linux-headers-2.6.24-16-xen_2.6.24-16.30zng1_amd64.deb
wget http://downloads.howtoforge.com/ubuntu_8.04_server_xen_from_repositories/linux-image-2.6.24-16-xen_2.6.24-16.30zng1_amd64.deb
sudo dpkg -i linux-headers-2.6.24-16-xen_2.6.24-16.30zng1_amd64.deb linux-image-2.6.24-16-xen_2.6.24-16.30zng1_amd64.deb

Restart into Xen

sudo xm list
Name                                        ID   Mem VCPUs      State   Time(s)
Domain-0                                     0  3888     2     r-----     57.7

sudo mkdir -p /xen/images
sudo dd if=/dev/zero of=/xen/images/para.partition bs=1M seek=10240 count=1
ls -lh /xen/images/
sudo mkfs.ext3 -F /xen/images/para.partition
sudo mkdir /mnt/para
sudo mount -o loop /xen/images/para.partition /mnt/para
sudo debootstrap hardy /mnt/para
sudo cp -a /lib/modules/`uname -r` /mnt/para/lib/modules/
echo para | sudo tee /mnt/para/etc/hostname

fix /etc/hosts, /etc/fstab, /etc/network/interfaces etc.

sudo umount /mnt/para
sudo gedit /etc/xen/para

kernel="/boot/vmlinuz-2.6.24-16-xen"
ramdisk="/boot/initrd.img-2.6.24-16-xen"
disk=['tap:aio:/xen/images/para.partition,xvda1,w']
memory=512
vif=['']
root="/dev/xvda1"
extra='xencons=tty'

sudo xm create -c para


sudo dd if=/dev/zero of=/xen/images/hvm.disk bs=1M seek=10240 count=1
sudo gedit /etc/xen/hvm

kernel="/usr/lib64/xen/boot/hvmloader"
builder="hvm"
device_model = "/usr/lib64/xen/bin/qemu-dm"
disk=['tap:aio:/xen/images/hvm.disk,hda,w','phy:/dev/<cdrom device>,hdc:cdrom,r']
#disk=['tap:aio:/xen/images/hvm.disk,hda,w','phy:/dev/loop0,hdc:cdrom,r']
sdl=1
boot="dc"
memory=512
vif=['type=ioemu,bridge=eth0']

Note that it if you want to use an ISO, just run the command:
sudo losetup `sudo losetup -f` The_ISO_file.iso

sudo xm create hvm

after the hvm install, you can do:

kernel="/usr/lib64/xen/boot/hvmloader"
builder="hvm"
device_model = "/usr/lib64/xen/bin/qemu-dm"
#disk=['tap:aio:/xen/images/hvm.disk,hda,w','phy:/dev/dvdrw1,hdc:cdrom,r']
#disk=['tap:aio:/xen/images/hvm.disk,hda,w','phy:/dev/loop0,hdc:cdrom,r']
disk=['phy:/xen/images/hvm.disk,hda,w']
sdl=1
boot="dc"
memory=512
vif=['type=ioemu,bridge=eth0']
#stdvga=1

NOTES:
UPDATE 1: add sudo in front of `losetup -f` so not it reads `sudo losetup -f`
UPDATE 2: change phy: to tap:aio: in the cases referring to image files (in the HVM config file examples)
UPDATE 3: added note at the top to state specific to amd64, but that i386 packages are available.

Delicious LiveJournal Links for 5-10-2008

  • May. 10th, 2008 at 9:37 AM
research, white shirt, apartment, Masters, ibm phd fellowship 2, ibm phd fellowship, tuxmasters, Todd, computer science, december, patty, clarkson, five long years, michigan, suit
research, white shirt, apartment, Masters, ibm phd fellowship 2, ibm phd fellowship, tuxmasters, Todd, computer science, december, patty, clarkson, five long years, michigan, suit
Book Review: Running Xen is an easy read. Easy in that it can actually be read cover to cover without becoming tired of mundane drivel. However it is not a glossy overview of Xen with its 500 plus pages covering everything from using prebuilt images that can be downloaded from jailtime.org, rpath, virtualappliances.net as well as other resources.

read more | digg story

Delicious LiveJournal Links for 4-26-2008

  • Apr. 26th, 2008 at 9:36 AM
research, white shirt, apartment, Masters, ibm phd fellowship 2, ibm phd fellowship, tuxmasters, Todd, computer science, december, patty, clarkson, five long years, michigan, suit

Delicious LiveJournal Links for 4-24-2008

  • Apr. 24th, 2008 at 9:41 AM
research, white shirt, apartment, Masters, ibm phd fellowship 2, ibm phd fellowship, tuxmasters, Todd, computer science, december, patty, clarkson, five long years, michigan, suit

Delicious LiveJournal Links for 4-20-2008

  • Apr. 20th, 2008 at 9:35 AM
research, white shirt, apartment, Masters, ibm phd fellowship 2, ibm phd fellowship, tuxmasters, Todd, computer science, december, patty, clarkson, five long years, michigan, suit

Focus on the positive

  • Apr. 14th, 2008 at 2:04 PM
research, white shirt, apartment, Masters, ibm phd fellowship 2, ibm phd fellowship, tuxmasters, Todd, computer science, december, patty, clarkson, five long years, michigan, suit
It's easy to find problems with this world, easy to find faults with people, places, and things. I think instead we should spend more time focusing on the positive. You don't have too look far to find your own example of this...

I have a lot to be thankful for and I'll just highlight a few things of these, since if they are not emphasized, they should be.

God sent his son to die for my sins so that I could have eternal life. He loved me so much that he was willing to sacrifice his only son for me.

Patty and I found each other and we love each other, I am very grateful for her.

God gave me a lot of talent and interest in learning, especially in the area of technology and computing.

Finally, I'll close with some links to what has been keeping me busy lately:

my website

running xen

Xen training session at USENIX


P.S.

One of the chapters from the Xen book was posted online for free by Prentice Hall, you can find it here: http://www.informit.com/articles/article.aspx?p=1187966

Delicious LiveJournal Links for 4-14-2008

  • Apr. 14th, 2008 at 9:36 AM
research, white shirt, apartment, Masters, ibm phd fellowship 2, ibm phd fellowship, tuxmasters, Todd, computer science, december, patty, clarkson, five long years, michigan, suit