The MLN Project

Complex virtual machine management made easy

Installing Xen and MLN on Ubuntu Edgy

This is a complete guide to setting up Xen and MLN on a freshly installed Ubuntu 6.10 Edgy. We will install Xen from Ubuntu's own packages. It has been tested on i386 only.

Phase 1: Installing Xen

  1. Edit /etc/apt/sources.list to include universe packages
  2. apt-get update
  3. On one line:
    apt-get install xen-image-xen0-2.6.17-6-generic-xen0
    xen-hypervisor-3.0-i386 xen-utils-3.0 bridge-utils  uml-utilities
  4. mkinitramfs -o /boot/initrd.img-2.6.17-6-generic-xen0
  5. Edit /etc/xen/xend-config.sxp:
    Change this line:
    (network-script network-dummy)
    (network-script 'network-bridge netdev=eth0')
    (Note the "eth0" is the outgoing network interface, this might be different on your box.)
  6. Edit /boot/grub/menu.lst. Add this right after: "## ## End Default Options ##"
    title           Xen 3.0.3
    root            (hd0,0)
    kernel  /boot/xen-3.0-i386.gz console=vga
    module /boot/xen0-linux-2.6.17-6-generic-xen0 root=/dev/hda1 ro console=tty0
    module /boot/initrd.img-2.6.17-6-generic-xen0
  7. Reboot into the Xen kernel, and check that xen is running with the following command:
    xm list
    If it prints out something like:
    Name                                      ID Mem(MiB) VCPUs State   Time(s)
    Domain-0                                   0      428     1 r-----    157.2
    Then you are ready to continue with installing MLN.

Phase 2: Installing MLN

  1. wget
  2. tar xzf mln-latest.tar.gz
  3. cd mln-latest
  4. ./mln setup

    Just go with the default choices.
  5. cp mln /usr/local/bin
  6. Next, we point MLN towards the Xen kernel we just installed:
    Edit /etc/mln/mln.conf and add the following two lines:
    xen_kernel /boot/xen0-linux-2.6.17-6-generic-xen0
    xen_ramdisk /boot/initrd.img-2.6.17-6-generic-xen0
  7. We are now ready to build our first project:
    mln build -f one-xen-host-on-lan.mln
  8. If the build finishes without any apparent errors, you are ready to start it:
    mln start -p xen_on_lan
    You should get the following output:
    Starting xeno.xen_on_lan in screen
    You can connect to this vm using 'screen -r xeno'
    Log on as root and don't forget to set a new root password
  9. Now you can connect to the VM using:
    screen -r xeno