20 Steps To Xen: A Quick Xen Tutorial For Ubuntu 7.04 x64 Server
This is an abbreviated and simplified version of a more official document. Run these either as root or with the “sudo” command..
- apt-get install ubuntu-xen-desktop-amd64 to install a new Xen kernel and various other tools. Apparently we’re supposed to use the “server” version instead, but it didn’t show up in the repository. Oh well.
- apt-get install debootstrap to install the “debootstrap” system bootstraping tool for you.
- reboot into the new kernel.
- xm list to make sure Domain-0 shows up. Domain-0 represents the host system.
- Edit /etc/xen/xend-config.sxp and uncomment “(network-script network-bridge)”. Also comment out “(network-script network-dummy)”.
- xend restart to restart the xen daemon.
- mkdir -p /xen/slave1 to create a mountpoint for the slave system disk.
- dd if=/dev/zero of=/xen/slave1.ext3 bs=1M count=512 to create a 512MB “disk” as a normal file.
- mkfs.ext3 /xen/slave1.ext3 to create a file system in said empty file.
- mount -o loop -t ext3 /xen/slave1.ext3 /xen/slave1 to manually mount the new filesystem to its mount point.
- debootstrap –arch amd64 edgy /xen/slave1 to install a bare bones edgy system onto the new file system.
- cp -a /lib/modules/2.6.19-4-generic-amd64/ /xen/slave1/lib/modules/ to install the hosts kernel modules into the new system.
- Edit /xen/slave1/etc/network/interfaces. It should look similar to..auto lo
iface lo inet loopbackauto eth0
iface eth0 inet static
gateway 192.168.1.110
address 192.168.1.111
netmask 255.255.255.0..where “gateway” is the host machines IP address, and “address” is a unique IP address for the slave machine.
- Update /xen/slave1/etc/hostname with whatever you want its host name to be.
- Update /xen/slave1/etc/hosts with all your IP addresses.
- Update /xen/slave1/etc/fstab to mount stuff on boot, like so..proc /proc proc defaults 0 0
/dev/hda1 / ext3 defaults,errors=remount-ro 0 1 - umount /xen/slave1 to unmount the file system.
- Create /etc/xen/edgy-guest.cfg to configure the host to start the guest, like so..
kernel = “/boot/vmlinuz-2.6.19-4-generic-amd64″
ramdisk = “/boot/initrd.img-2.6.19-4-generic-amd64″
builder=’linux’
memory = 512
name = “edgy-slave1″
vcpus = 1
vif = [ 'bridge=xenbr0' ]
disk = [ 'file:/xen/slave1.ext3,ioemu:hda1,w' ]
root = “/dev/hda1 ro” - xm create slave1-edgy.cfg to create and start the new domain.
- xm console slave1-edgy to establish a console to the new domain. (Hit CTRL+] to exit.)
You should now be able to log in via the xm console as root, and ping the guest on 192.168.1.111 (or whatever its IP address is). w00t!
Tags: howto, linux, ubuntu, virtualization, xen
. 03 Jun 07 | Computer | Comments (2)
The $1,000 (USD), 2TB OpenSolaris File Server
![]()
Here’s how to score a sweet OpenSolaris-compatible 2TB file server for $1000 (USD). I’m running Solaris Express Developer Edition on it with a ZFS RAIDZ1 file system.
- Motherboard: Asus M2NPV-VM. A great, inexpensive mATX board w/4 SATA ports, 2 IDE, PCI-X, GigE, built-in nVidia graphics w/DVI and VGA outs, FireWire, and tons of USB love. Oh, and the official nVidia driver works like a charm. Sweet! (The only thing that hasn’t run out-of-the-box is the built-in audio controller. Oh well.) $100.
- CPU: AMD Athlon 64 X2 4800+ Dual Core Processor. 2.5GHz, 2×512KB, 1GHz Bus. $130.
- Memory: 4×1GB via OCZ OCZ2G8002GK DDR2-800 PC2-6400 kits. $175 total (after MIR).
- Drives: 4x500GB Western Digital Caviar SE 16 WD5000AAKS 7200RPM 16MB Cache SATA 3.0Gb/s for the ZFS data volume. $450. (Old, small, slow and cheap PATA disks reused for the system volume. FMV ~$25.)
- Optical Drive: Reused old typical IDE DVD-ROM. FMV ~$20.
- Case: Reused typical ATX tower w/450 watt PSU. FMV ~$80.
- Peripherals: Reused optical mouse and keyboard. FMV ~$20.
Total: $1,000. Nice!
. 02 Jun 07 | Computer | Comments (2)


