Difference between revisions of "Vnx-install"
Line 185: | Line 185: | ||
* check is just here as a safety in case the unexpected | * check is just here as a safety in case the unexpected | ||
</pre> | </pre> | ||
− | |||
<li>Install libvirt 0.8.5 with that patch applied:</li> | <li>Install libvirt 0.8.5 with that patch applied:</li> | ||
Line 195: | Line 194: | ||
./configure --without-xen --prefix=/usr && make && make install | ./configure --without-xen --prefix=/usr && make && make install | ||
service libvirt-bin start | service libvirt-bin start | ||
+ | |||
+ | </ul> | ||
<li>Download old qemu bios from 0.10.6 version and copy it to /usr/share/qemu directory:</li> | <li>Download old qemu bios from 0.10.6 version and copy it to /usr/share/qemu directory:</li> |
Revision as of 17:01, 23 November 2010
VNX (Virtual Networks over X virtualization) v0.14 beta
Contents
Installation
Installing on Ubuntu 10.04/9.10
This section describes the procedure for installing VNX over Ubuntu 10.04 or 9.10. Open a root shell window and follow these steps:
- Install all packages required (basic development, virtualization, perl libraries and auxiliar packages):
apt-get update apt-get install build-essential qemu-kvm libvirt-bin vlan xterm bridge-utils \ screen virt-manager virt-viewer libxml-checker-perl \ libxml-parser-perl libnetaddr-ip-perl libnet-pcap-perl libnet-ipv6addr-perl \ liberror-perl libexception-class-perl uml-utilities libxml-libxml-perl \ libxml2-dev libgnutls-dev libdevmapper-dev libterm-readline-perl-perl libnet-telnet-perl libnet-ip-perl libnet-telnet-cisco-perl
apt-get install ia32-libs
/etc/init.d/libvirt-bin stop wget http://libvirt.org/sources/libvirt-0.7.5.tar.gz tar xfvz libvirt-0.7.5.tar.gz cd libvirt-0.7.5 ./configure --without-xen --prefix=/usr && make && make install /etc/init.d/libvirt-bin start
NOTE: By now, libvirt 0.7.5 is the only version of libvirt known to work with VNX.
NOTE2: libvirt 0.7.5 is available as a package in Ubuntu 10.04. However it has some problems related with the Apparmor profiles configured for libvirt. If you disable Apparmor (with "/etc/init.d/apparmor stop"), VNX will work with libvirt 0.7.5 installed as package, however we recommend to download and compile it as described above, in order to maintain Apparmor in your system.
- For Ubuntu 10.04, just install the libsys-virt-perl package
apt-get install libsys-virt-perl
wget http://search.cpan.org/CPAN/authors/id/D/DA/DANBERR/Sys-Virt-0.2.3.tar.gz tar xfvz Sys-Virt-0.2.3.tar.gz cd Sys-Virt-0.2.3 perl Makefile.PL make install
wget -N http://www.dit.upm.es/vnx/download/vnx-0.14b.tgz tar xfvz vnx-0.14b.tgz cd vnx-0.14b ./install_vnx
cd /usr/share/vnx/filesystems # ubuntu server wget -N http://idefix.dit.upm.es/download/vnx/filesystems/root_fs_ubuntu-10.04-v01.qcow2.bz2 bunzip2 root_fs_ubuntu-10.04-v01.qcow2.bz2 ln -s root_fs_ubuntu-10.04-v01.qcow2 root_fs_ubuntu # ubuntu with gui wget -N http://idefix.dit.upm.es/download/vnx/filesystems/root_fs_ubuntu-10.04-gui-v01.qcow2.bz2 bunzip2 root_fs_ubuntu-10.04-gui-v01.qcow2.bz2 ln -s root_fs_ubuntu-10.04-gui-v01.qcow2 root_fs_ubuntu-gui # freebsd server wget -N http://idefix.dit.upm.es/download/vnx/filesystems/root_fs_freebsd-v01.qcow2.bz2 bunzip2 root_fs_freebsd-v01.qcow2.bz2 ln -s root_fs_freebsd-v01.qcow2 root_fs_freebsd # freebsd gui wget -N http://idefix.dit.upm.es/download/vnx/filesystems/root_fs_freebsd-gui-v01.qcow2.bz2 bunzip2 root_fs_freebsd-gui-v01.qcow2.bz2 ln -s root_fs_freebsd-gui-v01.qcow2 root_fs_freebsd-gui # winxp and win7 # Sorry! Unfortunately for legal reasons we cannot distribute windows XP # or Windows 7 root filesystems. See VNX documentation for detailed recipes # to create these root fylesystems from scratch
# VNUML root_fs_tutorial and kernel cd /usr/share/vnx/filesystem wget -N http://idefix.dit.upm.es/download/vnx/filesystems/root_fs_tutorial-0.6.0.bz2 bunzip2 root_fs_tutorial-0.6.0.bz2 ln -s root_fs_tutorial-0.6.0 root_fs_tutorial cd /usr/share/vnx/kernels wget -N http://jungla.dit.upm.es/~vnx/download/kernels/linux-2.6.18.1-bb2-xt-4m chmod +x linux-2.6.18.1-bb2-xt-4m ln -s linux-2.6.18.1-bb2-xt-4m linux
NOTE for Ubuntu 10.04.1: It seems that an additional package has to be installed:
apt-get install kvm-pxe
Installing on Fedora 11 (Not completed yet)
Follow tis steps to install VNX over Fedora 11:
- Instalar VNUML sobre Fedora 11 siguiendo la receta en http://www.dit.upm.es/vnumlwiki/index.php/Fedora11
- Instalar paquetes y librerías necesarias:
yum install qemu-kvm libvirt virt-manager virt-viewer perl-XML-LibXML perl-Sys-Virt yum -y install bridge-utils readline-devel perl-Module-Build screen expat-devel libpcap-devel yum -y install perl-Net-Pcap perl-NetAddr-IP perl-Net-IPv6Addr perl-XML-DOM perl-Exception-Class yum -y install perl-TermReadKey perl-Error perl-CPAN uml_utilities xterm tunctl
perl -MCPAN -e shell install XML::Checker
ln -s /usr/bin/qemu-kvm /usr/bin/kvm
wget -N http://idefix.dit.upm.es/download/vnx/vnx-0.12b.tgz tar xfvz vnx-0.12b.tgz cd vnx-0.12b ./install-vnx
Additional install steps for Dynamips support
Additional install steps for Olive support
Several additional steps are needed to support Olive (Juniper) routers in VNX scenarios:
- Install a patched version of libvirt 0.85 with support to define the bios used by a virtual machine:
- Copy the following content to a file named libvirt-0.8.5-biosfile.patch (based on http://www.mail-archive.com/libvir-list@redhat.com/msg15952.html):
diff -crB libvirt-0.8.5.orig/src/conf/domain_conf.c libvirt-0.8.5/src/conf/domain_conf.c *** libvirt-0.8.5.orig/src/conf/domain_conf.c 2010-11-22 11:38:08.000000000 +0100 --- libvirt-0.8.5/src/conf/domain_conf.c 2010-11-22 11:47:41.000000000 +0100 *************** *** 4267,4272 **** --- 4267,4274 ---- if (node) def->mem.hugepage_backed = 1; + def->biosfile = virXPathString("string(./biosfile[1])", ctxt); + /* Extract other memory tunables */ if (virXPathULong("string(./memtune/hard_limit)", ctxt, &def->mem.hard_limit) < 0) diff -crB libvirt-0.8.5.orig/src/conf/domain_conf.h libvirt-0.8.5/src/conf/domain_conf.h *** libvirt-0.8.5.orig/src/conf/domain_conf.h 2010-11-22 11:38:08.000000000 +0100 --- libvirt-0.8.5/src/conf/domain_conf.h 2010-11-22 11:40:18.000000000 +0100 *************** *** 885,890 **** --- 885,891 ---- unsigned long min_guarantee; unsigned long swap_hard_limit; } mem; + char *biosfile; unsigned short vcpus; unsigned short maxvcpus; int cpumasklen; diff -crB libvirt-0.8.5.orig/src/qemu/qemu_conf.c libvirt-0.8.5/src/qemu/qemu_conf.c *** libvirt-0.8.5.orig/src/qemu/qemu_conf.c 2010-11-22 11:38:08.000000000 +0100 --- libvirt-0.8.5/src/qemu/qemu_conf.c 2010-11-22 11:41:05.000000000 +0100 *************** *** 3984,3989 **** --- 3984,3995 ---- ADD_ARG_LIT(emulator); ADD_ARG_LIT("-S"); + if(def->biosfile) + { + ADD_ARG_LIT("-bios"); + ADD_ARG_LIT(def->biosfile); + } + /* This should *never* be NULL, since we always provide * a machine in the capabilities data for QEMU. So this * check is just here as a safety in case the unexpected
service libvirt-bin stop wget http://libvirt.org/sources/libvirt-0.8.5.tar.gz tar xfvz libvirt-0.8.5.tar.gz cd libvirt-0.8.5 patch -p1 -i ../libvirt-0.8.5-biosfile.patch ./configure --without-xen --prefix=/usr && make && make install service libvirt-bin start
wget http://downloads.sourceforge.net/project/kvm/qemu-kvm/0.10.6/qemu-kvm-0.10.6.tar.gz tar xfvz qemu-kvm-0.10.6.tar.gz cp qemu-kvm-0.10.6/pc-bios/bios.bin /usr/share/qemu-kvm/bios-0.10.6.bin
wget http://downloads.sourceforge.net/project/kvm/qemu-kvm/0.12.5/qemu-kvm-0.12.5.tar.gz tar xfvz qemu-kvm-0.12.5.tar.gz cp qemu-kvm-0.12.5/pc-bios/pxe-i82559er.bin /usr/share/qemu-kvm/