Installing VNUML 1.7.0 over a fresh Suse 10.1 distribution (version 3, 19/7/2006)
Main recommendations to use VNUML in Suse 10.1:
- Use gnome-terminal. If you plan to use xterm based consoles, include the "<xterm>gnome-terminal,-t,-x</xterm>" directive. Using standard xterms, I had a problem in two of the machines I tested: the simulation does not start correctly and some UML related processes will remain hanged after you stop the simulation.
- Use VNUML v1.7-0-rc1 with kernel 184.108.40.206-bs3-tls-xt-1m and root_fs_tutorial-0.4.0. Tests with VNUML 1.6 and old guest kernels and filesystems have failed.
- Optionally, you can install SKAS3 patch to the host kernel to improve performance (security is the same with SKAS0 and SKAS3). VNUML 1.7 works without it in SKAS0. The performance differences are not big (for example, when starting simple.xml, it takes 14 s with SKAS0 and 12 with SKAS3).
- Do the normal installation using Suse 10.1 DVD (I selected compiler and C/C++ development tools and kernel development in software options). It is recommended to download all updates when asked to do that (you can do it also after installation).
- Add the following repository (or a mirror) to the installation sources: Protocol: http Server: download.opensuse.org Directory: /distribution/SL-10.1/inst-source/suse/
- Launch Yast2 and install the following packages: "bridge_utils", "uml-utilities", "perl-Module-Build" and, if you plan to use VLANs functionallity, "vlan". Note: A new version of uml-utilities can be downloaded from http://www.user-mode-linux.org/~blaisorblade/uml-utilities/uml_utilities_20060323.tar.bz2. To install it, just download the source, uncompress it and "make; make install". You have to previosuly install "readline-devel" package from Yast. Either versions worked for me.
- Download the latest version of VNUML from http://www.dit.upm.es/vnuml and:
- If executed now, vnumparser.pl fails because some perl modules (NetAddr::IP, Net::IPv4Addr, Net::IPv6Addr and Net::Pcap) have not been correctly installed. Install them manually using MCPAN:
- Download root filesystem (root_fs_tutorial-0.4.0.bz2) from VNUML site (http://jungla.dit.upm.es/~vnuml/download/filesystems/root_fs_tutorial-0.4.0.bz2) and copy it to /usr/local/share/vnuml/filesystems. Create a symbolic link to it named "root_fs_tutorial":
- Download guest kernel (linux-220.127.116.11-bs3-tls-xt-1m.tar.bz2) from VNUML site (http://jungla.dit.upm.es/~vnuml/download/linux/linux-18.104.22.168-bs3-tls-xt-1m.tar.bz2) and copy it to /usr/local/share/vnuml/kernels/src. Untar the file, copy the kernel and create a symbolic link to it:
- Installation is finished. Edit simple.xml example and uncoment the "gnome-terminal" line and start it to see if everything works:
tar xfvz vnuml-1.7.0-rc1.tar.gz cd vnuml-1.7.0-rc1 ./configure --with-build_modules make make install (answer "NO" if asked "Are you ready for manual configuration?". Answer the default option to other questions). (repeat "make install" as sometimes some of the modules are not downloaded correctly)
perl -MCPAN -e shell cpan> install Net::IPv4Addr cpan> install Net::IPv6Addr cpan> force install NetAddr::IP cpan> install Net::Pcap
(In my case, module NetAddr::IP fails one of the tests and it is not installed; that is why I have to use the "force" option to install it).
Or alternatively download the perl modules from www.cpan.org and install them (files NetAddr-IP-XXX.tar.gz, Net-IPv6Addr-XXX.tar.gz and Net-IPv4Addr-0.08.tar.gz).
cp root_fs_tutorial-0.4.0.bz2 /usr/local/share/vnuml/filesystems cd /usr/local/share/vnuml/filesystems bunzip2 root_fs_tutorial-0.4.0.bz2 ln -s root_fs_tutorial-0.4.0 root_fs_tutorial
mkdir /usr/local/share/vnuml/kernels/src cp linux-22.214.171.124-bs3-tls-xt-1m.tar.bz2 /usr/local/share/vnuml/kernels/src cd /usr/local/share/vnuml/kernels/src tar xfvj linux-126.96.36.199-bs3-tls-xt-1m.tar.bz2 cp linux-188.8.131.52-bs3-tls-xt-1m/linux-184.108.40.206-bs3-tls-xt-1m .. cd .. ln -s linux-220.127.116.11-bs3-tls-xt-1m linux
vnumparser.pl -t /usr/local/share/vnuml/examples/simple.xml -v
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
To patch the host kernel with the SKAS3 patch:
- Download kernel sources using Yast (package kernel-source). The sources are installed in /usr/src/linux.
- Download skas-2.6.16-v8.2.patch.bz2 from Blaisorblade's site:
- Apply the patch:
- Edit /boot/grub/menu.lst to add an option to boot the new kernel and restart the machine. After restarting, check if the kernel has been correctly installed:
- Finally, take into account that if you later upgrade the kernel using YOU, you will loose the SKAS patch. Instead you will have to upgrade the kernel manually, as described here.
cd /usr/src wget http://www.user-mode-linux.org/~blaisorblade/patches/skas3-2.6/skas-2.6.16-v8.2/skas-2.6.16-v8.2.patch.bz2
cd /usr/src/linux bzcat ../skas-2.6.16-v8.2.patch.bz2 | patch -p1 make clean make oldconfig make menuconfig (only if you want to change anything) make make modules make modules_install make install
uname -a Linux vallecas 18.104.22.168-4-skas3-v8.2-smp #1 SMP Thu Jul 13 19:29:47 CEST 2006 i686 i686 i386 GNU/Linux