Difference between revisions of "Vnx-install-ubuntu"
(Created page with "== Installation over 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: <ul...") |
|||
(29 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | + | {{Title|VNX Installation over Ubuntu}} | |
− | This section describes the procedure for installing VNX over Ubuntu 10.04 or 9.10. Open a root shell window and follow these steps: | + | This section describes the procedure for manually installing VNX over Ubuntu 11.04, 10.10, 10.04 or 9.10. |
+ | |||
+ | Open a root shell window and follow these steps: | ||
<ul> | <ul> | ||
Line 13: | Line 15: | ||
libdevmapper-dev libterm-readline-perl-perl libnet-telnet-perl \ | libdevmapper-dev libterm-readline-perl-perl libnet-telnet-perl \ | ||
libnet-ip-perl libreadonly-perl libmath-round-perl libappconfig-perl \ | libnet-ip-perl libreadonly-perl libmath-round-perl libappconfig-perl \ | ||
− | libdbi-perl graphviz libnl-dev genisoimage gnome-terminal libfile-homedir-perl python-dev libsasl2-dev | + | libdbi-perl graphviz libnl-dev genisoimage gnome-terminal \ |
+ | libfile-homedir-perl python-dev libsasl2-dev tree libio-pty-perl curl w3m picocom expect | ||
− | |||
<li>If you use 64 bits version of Ubuntu, install 32 bits compatibility libraries:</li> | <li>If you use 64 bits version of Ubuntu, install 32 bits compatibility libraries:</li> | ||
apt-get install ia32-libs | apt-get install ia32-libs | ||
− | <li> | + | <li>For Ubuntu 11.04/10.10/10.04 an additional package has to be installed:</li> |
+ | apt-get install kvm-pxe | ||
+ | |||
+ | <li>Upgrade libvirt to 0.9.3:</li> | ||
/etc/init.d/libvirt-bin stop | /etc/init.d/libvirt-bin stop | ||
wget http://libvirt.org/sources/libvirt-0.9.3.tar.gz | wget http://libvirt.org/sources/libvirt-0.9.3.tar.gz | ||
Line 26: | Line 31: | ||
./configure --without-xen --prefix=/usr && make && make install | ./configure --without-xen --prefix=/usr && make && make install | ||
/etc/init.d/libvirt-bin start | /etc/init.d/libvirt-bin start | ||
− | + | '''NOTE''': VNX is known to (basically) work with other libvirt versions like 0.8.5 and 0.8.8. However, as some problems have been detected with that versions and our present development and testing platform uses libvirt 0.9.3, we strongly recommend to use that version. | |
− | '''NOTE''': VNX | + | <!-- OLD |
+ | work with other libvirt versions from 0.7.5 to 0.8.5 (it has been mainly tested with 0.7.5 and 0.8.5). Note that, although libvirt 0.7.5 is available as a package in Ubuntu 10.04, 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 version 0.8.5 as described above, in order to maintain Apparmor in your system. | ||
+ | --> | ||
<li>Install Sys::Virt perl module:</li> | <li>Install Sys::Virt perl module:</li> | ||
<ul> | <ul> | ||
− | <li>For Ubuntu 10.04, just install the libsys-virt-perl package</li> | + | <li>For Ubuntu 11.04/10.10/10.04, just install the libsys-virt-perl package</li> |
apt-get install libsys-virt-perl | apt-get install libsys-virt-perl | ||
<!-- | <!-- | ||
Line 47: | Line 54: | ||
mkdir /tmp/vnx-update | mkdir /tmp/vnx-update | ||
cd /tmp/vnx-update | cd /tmp/vnx-update | ||
− | wget | + | rm -rf /tmp/vnx-update/vnx-* |
+ | wget http://vnx.dit.upm.es/vnx/vnx-latest.tgz | ||
tar xfvz vnx-latest.tgz | tar xfvz vnx-latest.tgz | ||
cd vnx-* | cd vnx-* | ||
Line 53: | Line 61: | ||
<li>Create the VNX config file (/etc/vnx.conf). You just can move the sample config file:</li> | <li>Create the VNX config file (/etc/vnx.conf). You just can move the sample config file:</li> | ||
− | mv | + | mv /usr/share/vnx/etc/vnx.conf.sample /etc/vnx.conf |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
+ | <li>Download root file systems from http://idefix.dit.upm.es/download/vnx/filesystems and install them following these [[Vnx-install-root_fs|instructions]]</li> | ||
=== Additional install steps for Dynamips support === | === Additional install steps for Dynamips support === | ||
Line 174: | Line 139: | ||
idle-pc get R | idle-pc get R | ||
Once you know the idle-pc value for your system, include it in /etc/vnx.conf file. | Once you know the idle-pc value for your system, include it in /etc/vnx.conf file. | ||
+ | |||
+ | <!-- | ||
=== Additional install steps for Olive support === | === Additional install steps for Olive support === | ||
− | + | An additional step is needed to support Olive (Juniper) routers in VNX scenarios: | |
<ul> | <ul> | ||
+ | |||
+ | <li>Create a special bios for Olive with the CONFIG_SMBIOS option disabled: </li> | ||
+ | wget http://www.linuxtogo.org/~kevin/SeaBIOS/seabios-0.6.2.tar.gz | ||
+ | tar xfvz seabios-0.6.2.tar.gz | ||
+ | cd seabios-0.6.2 | ||
+ | make | ||
+ | sed -i -e 's/#define CONFIG_SMBIOS 1/#define CONFIG_SMBIOS 0/' out/autoconf.h | ||
+ | make | ||
+ | cp out/bios.bin /usr/share/kvm/bios-olive.bin | ||
+ | See more details [http://inetpro.org/wiki/Using_QEMU_with_Olive_to_emulate_Juniper_Routers#Watchdog_panic_immediately_after_boot here] | ||
+ | --> | ||
+ | |||
<!-- Ya no hace falta desde que se usa <qemu:commandline> | <!-- Ya no hace falta desde que se usa <qemu:commandline> | ||
Line 245: | Line 224: | ||
</ul> | </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> | ||
wget http://downloads.sourceforge.net/project/kvm/qemu-kvm/0.10.6/qemu-kvm-0.10.6.tar.gz | 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 | 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 | cp qemu-kvm-0.10.6/pc-bios/bios.bin /usr/share/qemu-kvm/bios-0.10.6.bin | ||
+ | --> | ||
<!-- Not needed, it seems to work without downloading this drivers | <!-- Not needed, it seems to work without downloading this drivers |
Latest revision as of 15:01, 26 June 2013
VNX Installation over Ubuntu
This section describes the procedure for manually installing VNX over Ubuntu 11.04, 10.10, 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 libreadonly-perl libmath-round-perl libappconfig-perl \ libdbi-perl graphviz libnl-dev genisoimage gnome-terminal \ libfile-homedir-perl python-dev libsasl2-dev tree libio-pty-perl curl w3m picocom expect
apt-get install ia32-libs
apt-get install kvm-pxe
/etc/init.d/libvirt-bin stop wget http://libvirt.org/sources/libvirt-0.9.3.tar.gz tar xfvz libvirt-0.9.3.tar.gz cd libvirt-0.9.3 ./configure --without-xen --prefix=/usr && make && make install /etc/init.d/libvirt-bin start
NOTE: VNX is known to (basically) work with other libvirt versions like 0.8.5 and 0.8.8. However, as some problems have been detected with that versions and our present development and testing platform uses libvirt 0.9.3, we strongly recommend to use that version.
- For Ubuntu 11.04/10.10/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
mkdir /tmp/vnx-update cd /tmp/vnx-update rm -rf /tmp/vnx-update/vnx-* wget http://vnx.dit.upm.es/vnx/vnx-latest.tgz tar xfvz vnx-latest.tgz cd vnx-* ./install_vnx
mv /usr/share/vnx/etc/vnx.conf.sample /etc/vnx.conf
Additional install steps for Dynamips support
- Install Dynamips and Dynagen:
apt-get install dynamips dynagen
- Create a file /etc/init.d/dynamips (taken from http://7200emu.hacki.at/viewtopic.php?t=2198):
#!/bin/sh # Start/stop the dynamips program as a daemon. # ### BEGIN INIT INFO # Provides: dynamips # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Cisco hardware emulator daemon ### END INIT INFO DAEMON=/usr/bin/dynamips NAME=dynamips PORT=7200 PIDFILE=/var/run/$NAME.pid LOGFILE=/var/log/$NAME.log DESC="Cisco Emulator" SCRIPTNAME=/etc/init.d/$NAME test -f $DAEMON || exit 0 . /lib/lsb/init-functions case "$1" in start) log_daemon_msg "Starting $DESC " "$NAME" start-stop-daemon --start --chdir /tmp --background --make-pidfile --pidfile $PIDFILE --name $NAME --startas $DAEMON -- -H $PORT -l $LOGFILE log_end_msg $? ;; stop) log_daemon_msg "Stopping $DESC " "$NAME" start-stop-daemon --stop --quiet --pidfile $PIDFILE --name $NAME log_end_msg $? ;; restart) log_daemon_msg "Restarting $DESC " "$NAME" start-stop-daemon --stop --retry 5 --quiet --pidfile $PIDFILE --name $NAME start-stop-daemon --start --chdir /tmp --background --make-pidfile --pidfile $PIDFILE --name $NAME --startas $DAEMON -- -H $PORT -l $LOGFILE log_end_msg $? ;; status) status_of_proc -p $PIDFILE $DAEMON $NAME && exit 0 || exit $? #status $NAME #RETVAL=$? ;; *) log_action_msg "Usage: $SCRIPTNAME {start|stop|restart|status}" exit 2 ;; esac exit 0
- Set execution permissions for the script and add it to system start-up:
chmod +x /etc/init.d/dynamips update-rc.d dynamips defaults /etc/init.d/dynamips start
- Download and install cisco IOS image:
cd /usr/share/vnx/filesystems # Cisco image wget ... c3640-js-mz.124-19.image ln -s c3640-js-mz.124-19.image c3640
- Calculate the idle-pc value for your computer following the procedure in http://dynagen.org/tutorial.htm:
dynagen /usr/share/vnx/examples/R.net console R # type 'no' to exit the config wizard and wait # for the router to completely start idle-pc get R
Once you know the idle-pc value for your system, include it in /etc/vnx.conf file.