Ubuntu
Contents
Installing VNUML over a Ubuntu 6.06, 6.10 or 7.04
Installation using debian package and vnuml repository
- Open a shell terminal ("Applications|Accesories|Terminal" menu option) and give it root priviledges:
- Activate Ubuntu community package sources (universe). They are necesary to install some of the packages VNUML depends on. You can do it by one of two methods:
- Editing /etc/apt/sources.list and uncommenting the "deb ..." lines that end with "universe", or
- Starting "synaptic" application (you can find it in System|Administration menu) and going to "Configuration|Repositories" menu option and selecting the the community repositories (universe).
- Add VNUML repository to sources.list file:
- Update and upgrade the system:
- Install vnuml package:
- Download root filesystem (root_fs_tutorial-0.4.1.bz2) from VNUML site and:
- Download guest kernel (linux-2.6.16.27-bs2-xt-1m.tar.bz2) from VNUML site and:
- Create ssh key:
- Installation is finished. Test simple.xml example to see if everything works:
sudo su
Note: remember that in Ubuntu when you issue a command preceded by sudo you have to type your own password, not the root one, which is normally disabled.
echo "deb http://jungla.dit.upm.es/~vnuml/debian binary/" >> /etc/apt/sources.list
apt-get update apt-get upgrade
Note: you should restart the system after upgrading in case a new version of the kernel is installed.
apt-get install vnuml
cp root_fs_tutorial-0.4.1.bz2 /usr/share/vnuml/filesystems cd /usr/share/vnuml/filesystems bunzip2 root_fs_tutorial-0.4.1.bz2 ln -s root_fs_tutorial-0.4.1 root_fs_tutorial
mkdir /usr/share/vnuml/kernels/src cp linux-2.6.18.1-bb2-xt-1m.tar.bz2 /usr/share/vnuml/kernels/src cd /usr/share/vnuml/kernels/src tar xfvj linux-2.6.18.1-bb2-xt-1m.tar.bz2 cp linux-2.6.18.1-bb2-xt-1m/linux-2.6.18.1-bb2-xt-1m .. cd .. ln -s linux-2.6.18.1-bb2-xt-1m linux
ssh-keygen -t rsa1
vnumlparser.pl -t /usr/share/vnuml/examples/simple.xml -v -u root
Note: if you execute the example from a "root" session, you should add the option "-u root" at the end of the line. There are some pending bugs that prevent a simulation to work when executed as "vnuml" user (the default when you do not use -u option) from a root session.
Manual installation from tar file
- Activate Ubuntu community package sources (universe). They are necesary to install some of the packages VNUML depends on. You can do it by one of two methods:
- Editing /etc/apt/sources.list and uncommenting the "deb ..." lines that end with "universe", or
- Starting "synaptic" application (you can find it in System|Administration menu) and going to "Configuration|Repositories" menu option and selecting the the community repositories (universe).
- Update and upgrade the system:
- Install development utils and vlan support (optional):
- Install VNUML related utilities and perl libraries:
- Download the latest version of vnuml parser from VNUML site and install it:
- Download root filesystem (root_fs_tutorial-0.4.1.bz2) from VNUML site and:
- Download guest kernel (linux-2.6.16.27-bs2-xt-1m.tar.bz2) from VNUML site and:
- Create ssh key:
- Installation is finished. Test simple.xml example to see if everything works:
sudo su apt-get update apt-get upgrade
Note: remember that in Ubuntu when you issue a command preceded by sudo you have to type your own password, not the root one, which is normally disabled. You should restart the system after upgrading, as a new version of the kernel is installed.
apt-get -y install build-essential vlan
apt-get install bridge-utils uml-utilities apt-get -y install libmodule-build-perl liberror-perl \ libexception-class-perl libxml-dom-perl libxml-checker-perl \ libterm-readkey-perl libnet-pcap-perl libnetwork-ipv4addr-perl \ libnetaddr-ip-perl
Net::IPv6Addr perl module is not avalaible as debian package, so it has to be installed using MCPAN:
perl -MCPAN -e "install Net::IPv6Addr" (Note: answer "NO" if asked "Are you ready for manual configuration?")
tar xfvz vnuml_1.7.3.orig.tar.gz cd vnuml-1.7.3 ./configure --with-build_modules make make install (Note: answer "NO" if asked "Are you ready for manual configuration?")
cp root_fs_tutorial-0.4.1.bz2 /usr/local/share/vnuml/filesystems cd /usr/local/share/vnuml/filesystems bunzip2 root_fs_tutorial-0.4.1.bz2 ln -s root_fs_tutorial-0.4.1 root_fs_tutorial
mkdir /usr/local/share/vnuml/kernels/src cp linux-2.6.16.27-bs2-xt-1m.tar.bz2 /usr/local/share/vnuml/kernels/src cd /usr/local/share/vnuml/kernels/src tar xfvj linux-2.6.16.27-bs2-xt-1m.tar.bz2 cp linux-2.6.16.27-bs2-xt-1m/linux-2.6.16.27-bs2-xt-1m .. cd .. ln -s linux-2.6.16.27-bs2-xt-1m linux
ssh-keygen -t rsa1
vnumparser.pl -t /usr/local/share/vnuml/examples/simple.xml -v -u root
Note: if you execute the example from a "root" session, you should add the option "-u root" at the end of the line. There are some pending bugs that prevent a simulation to work when executed as "vnuml" user (the default when you do not use -u option) from a root session.
Installing SKAS patch in host kernel
VNUML works well over the standard kernel that comes with Ubuntu (using SKAS 0 mode). However, if you want to improve the performance, you can install the the SKAS 3 patch to the kernel. To do that:
- Install kernel sources and some system utilities:
- Download SKAS3 patch from Blaisorblade's server and apply it to kernel sources:
- Configure, compile and install the new kernel:
apt-get install linux-source libncurses5-dev initrd-tools
cd /usr/src wget http://www.user-mode-linux.org/~blaisorblade/patches/skas3-2.6/skas-2.6.15-v8.2/skas-2.6.15-v8.2.patch.bz2 tar xfvj linux-source-2.6.15.tar.bz2 cd linux-source-2.6.15 bzcat ../skas-2.6.15-v8.2.patch.bz2 | patch -p1
make oldconfig make Note: I´ve got an error related to "drivers/usb/net/zd1211/zddevlist.h"; to solve it, do a "make menuconfig" and desactivate support for that usb card in "Device drivers|USB support|USB network adapters") make modules make modules_install make install
Note: make install fails and does neither generate initrd file nor configure grub. Do it by hand:
mkinitrd -o /boot/initrd.img-2.6-15.7-ubuntu1-skas3-v8.2 2.6-15.7-ubuntu1-skas3-v8.2
And edit /boot/grub/menu.lst and add a new entry for the new kernel like (this is just an example; change the parameters as appropriate to your system):
title Ubuntu, kernel 2.6.15.7-ubuntu1-skas3-v8.2 root (hd0,3) kernel /boot/vmlinuz-2.6.15.7-ubuntu1-skas3-v8.2 root=/dev/hda4 ro quiet splash initrd /boot/initrd.img-2.6.15.7-ubuntu1-skas3-v8.2 savedefault boot