Difference between revisions of "Vnx-install"

From VNUML-WIKI
Jump to: navigation, search
(Installation over Ubuntu 10.04/9.10)
 
(15 intermediate revisions by the same user not shown)
Line 15: 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
+
   libdbi-perl graphviz libnl-dev genisoimage gnome-terminal libfile-homedir-perl
  
 
<!--Note: for Ubuntu 9.04 change "qemu-kvm" package by "qemu kvm" -->
 
<!--Note: for Ubuntu 9.04 change "qemu-kvm" package by "qemu kvm" -->
Line 55: Line 55:
  
 
<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 /etc/vnx.conf.samble /etc/vnx.conf
+
  mv /etc/vnx.conf.sample /etc/vnx.conf
  
 
<li>Download root file systems from http://idefix.dit.upm.es/download/vnx/filesystems and copy them to /usr/share/vnx/filesystems directory:</li>
 
<li>Download root file systems from http://idefix.dit.upm.es/download/vnx/filesystems and copy them to /usr/share/vnx/filesystems directory:</li>
Line 61: Line 61:
 
   
 
   
 
  # ubuntu server
 
  # ubuntu server
  wget -N http://idefix.dit.upm.es/download/vnx/filesystems/root_fs_ubuntu-10.10-v01.qcow2.bz2
+
  wget -N http://idefix.dit.upm.es/download/vnx/filesystems/root_fs_ubuntu-10.10-v02.qcow2.bz2
  bunzip2 root_fs_ubuntu-10.10-v01.qcow2.bz2
+
  bunzip2 root_fs_ubuntu-10.10-v02.qcow2.bz2
  ln -s root_fs_ubuntu-10.10-v01.qcow2 root_fs_ubuntu
+
  ln -s root_fs_ubuntu-10.10-v02.qcow2 root_fs_ubuntu
 
   
 
   
 
  # ubuntu with gui
 
  # ubuntu with gui
  wget -N http://idefix.dit.upm.es/download/vnx/filesystems/root_fs_ubuntu-10.04-gui-v01.qcow2.bz2
+
  wget -N http://idefix.dit.upm.es/download/vnx/filesystems/root_fs_ubuntu-10.10-gui-v01.qcow2.bz2
  bunzip2 root_fs_ubuntu-10.04-gui-v01.qcow2.bz2
+
  bunzip2 root_fs_ubuntu-10.10-gui-v01.qcow2.bz2
  ln -s root_fs_ubuntu-10.04-gui-v01.qcow2 root_fs_ubuntu-gui
+
  ln -s root_fs_ubuntu-10.10-gui-v01.qcow2 root_fs_ubuntu-gui
 
   
 
   
 
  # freebsd server
 
  # freebsd server
  wget -N http://idefix.dit.upm.es/download/vnx/filesystems/root_fs_freebsd-v01.qcow2.bz2
+
  wget -N http://idefix.dit.upm.es/download/vnx/filesystems/root_fs_freebsd-8.1-v01.qcow2.bz2
  bunzip2 root_fs_freebsd-v01.qcow2.bz2
+
  bunzip2 root_fs_freebsd-8.1-v01.qcow2.bz2
  ln -s root_fs_freebsd-v01.qcow2 root_fs_freebsd
+
  ln -s root_fs_freebsd-8.1-v01.qcow2 root_fs_freebsd
 
   
 
   
 
  # freebsd gui
 
  # freebsd gui
  wget -N http://idefix.dit.upm.es/download/vnx/filesystems/root_fs_freebsd-gui-v01.qcow2.bz2
+
  wget -N http://idefix.dit.upm.es/download/vnx/filesystems/root_fs_freebsd-8.1-gui-v01.qcow2.bz2
  bunzip2 root_fs_freebsd-gui-v01.qcow2.bz2
+
  bunzip2 root_fs_freebsd-8.1-gui-v01.qcow2.bz2
  ln -s root_fs_freebsd-gui-v01.qcow2 root_fs_freebsd-gui
+
  ln -s root_fs_freebsd-8.1-gui-v01.qcow2 root_fs_freebsd-gui
 
   
 
   
 
  # winxp and win7
 
  # winxp and win7
Line 87: Line 87:
 
<li>Additionally, if you plan to use VNUML root filesystem:</li>
 
<li>Additionally, if you plan to use VNUML root filesystem:</li>
 
  # VNUML root_fs_tutorial and kernel
 
  # VNUML root_fs_tutorial and kernel
  cd /usr/share/vnx/filesystem
+
  cd /usr/share/vnx/filesystems
 
  wget -N http://idefix.dit.upm.es/download/vnx/filesystems/root_fs_tutorial-0.6.0.bz2
 
  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
 
  bunzip2 root_fs_tutorial-0.6.0.bz2
Line 100: Line 100:
 
'''NOTE for Ubuntu 10.04.1''': It seems that an additional package has to be installed:
 
'''NOTE for Ubuntu 10.04.1''': It seems that an additional package has to be installed:
 
  apt-get install kvm-pxe
 
  apt-get install kvm-pxe
 +
  
 
=== Additional install steps for Dynamips support ===
 
=== Additional install steps for Dynamips support ===
Line 161: Line 162:
 
  chmod +x /etc/init.d/dynamips
 
  chmod +x /etc/init.d/dynamips
 
  update-rc.d dynamips defaults
 
  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:
 
* Calculate the idle-pc value for your computer following the procedure in http://dynagen.org/tutorial.htm:
/etc/init.d/dynamips start
 
 
  dynagen /usr/share/vnx/examples/R.net
 
  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.
  
 
=== Additional install steps for Olive support ===
 
=== Additional install steps for Olive support ===
Line 249: Line 260:
 
-->
 
-->
 
</ul>
 
</ul>
 
  
 
== Installation over Fedora 11 (Draft) ==
 
== Installation over Fedora 11 (Draft) ==
Line 295: Line 305:
 
  ln -s /usr/bin/qemu-kvm /usr/bin/kvm
 
  ln -s /usr/bin/qemu-kvm /usr/bin/kvm
  
<li>Instalar VNX:</li>
+
<li>Install VNX:</li>
 +
mkdir /tmp/vnx-update
 +
cd /tmp/vnx-update
 
  wget -N http://idefix.dit.upm.es/download/vnx/vnx-latest.tgz
 
  wget -N http://idefix.dit.upm.es/download/vnx/vnx-latest.tgz
 
  tar xfvz vnx-latest.tgz
 
  tar xfvz vnx-latest.tgz
 
  cd vnx-*
 
  cd vnx-*
  ./install-vnx
+
  ./install_vnx
  
 
<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 /etc/vnx.conf.samble /etc/vnx.conf
 
  mv /etc/vnx.conf.samble /etc/vnx.conf
  
<li>Deshabilitar el firewall o, alternativamente, configurar los interfaces tipo "tun" como confiables (Sistema->Firewall->Interfaces Confiables").</li>
+
<li>Disable host firewall or, alternatively, configure "tun" type network interfaces as trusted interfaces (System->Firewall->Trusted Interfaces).</li>
 +
 
 +
<li>Download root file systems from http://idefix.dit.upm.es/download/vnx/filesystems and copy them to /usr/share/vnx/filesystems directory:</li>
 +
cd /usr/share/vnx/filesystems
 +
 +
# ubuntu server
 +
wget -N http://idefix.dit.upm.es/download/vnx/filesystems/root_fs_ubuntu-10.10-v01.qcow2.bz2
 +
bunzip2 root_fs_ubuntu-10.10-v01.qcow2.bz2
 +
ln -s root_fs_ubuntu-10.10-v01.qcow2 root_fs_ubuntu
 +
 +
# ubuntu with gui
 +
wget -N http://idefix.dit.upm.es/download/vnx/filesystems/root_fs_ubuntu-10.10-gui-v01.qcow2.bz2
 +
bunzip2 root_fs_ubuntu-10.10-gui-v01.qcow2.bz2
 +
ln -s root_fs_ubuntu-10.10-gui-v01.qcow2 root_fs_ubuntu-gui
 +
 +
# freebsd server
 +
wget -N http://idefix.dit.upm.es/download/vnx/filesystems/root_fs_freebsd-8.1-v01.qcow2.bz2
 +
bunzip2 root_fs_freebsd-8.1-v01.qcow2.bz2
 +
ln -s root_fs_freebsd-8.1-v01.qcow2 root_fs_freebsd
 +
 +
# freebsd gui
 +
wget -N http://idefix.dit.upm.es/download/vnx/filesystems/root_fs_freebsd-8.1-gui-v01.qcow2.bz2
 +
bunzip2 root_fs_freebsd-8.1-gui-v01.qcow2.bz2
 +
ln -s root_fs_freebsd-8.1-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
 +
 
 
</ul>
 
</ul>
  
Line 317: Line 358:
 
* Set execution permissions for the script and add it to system start-up:
 
* Set execution permissions for the script and add it to system start-up:
 
  chkconfig --add dynamips
 
  chkconfig --add dynamips
 +
/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:
 
* Calculate the idle-pc value for your computer following the procedure in http://dynagen.org/tutorial.htm:
/etc/init.d/dynamips start
 
 
  dynagen /usr/share/vnx/examples/R.net
 
  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.
  
 
=== Additional install steps for Olive support ===
 
=== Additional install steps for Olive support ===

Latest revision as of 19:17, 10 May 2011

VNX (Virtual Networks over X virtualization) v0.14 beta

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:

  • 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
    
  • If you use 64 bits version of Ubuntu, install 32 bits compatibility libraries:
  •  apt-get install ia32-libs
    
  • Install libvirt 0.8.5:
  •  /etc/init.d/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
     ./configure --without-xen --prefix=/usr && make && make install
     /etc/init.d/libvirt-bin start
    

    NOTE: VNX should work with 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.

  • Install Sys::Virt perl module:
  • Install VNX:
  • mkdir /tmp/vnx-update
    cd /tmp/vnx-update
    wget -N http://idefix.dit.upm.es/download/vnx/vnx-latest.tgz
    tar xfvz vnx-latest.tgz
    cd vnx-*
    ./install_vnx
    
  • Create the VNX config file (/etc/vnx.conf). You just can move the sample config file:
  • mv /etc/vnx.conf.sample /etc/vnx.conf
    
  • Download root file systems from http://idefix.dit.upm.es/download/vnx/filesystems and copy them to /usr/share/vnx/filesystems directory:
  • cd /usr/share/vnx/filesystems
    
    # ubuntu server
    wget -N http://idefix.dit.upm.es/download/vnx/filesystems/root_fs_ubuntu-10.10-v02.qcow2.bz2
    bunzip2 root_fs_ubuntu-10.10-v02.qcow2.bz2
    ln -s root_fs_ubuntu-10.10-v02.qcow2 root_fs_ubuntu
    
    # ubuntu with gui
    wget -N http://idefix.dit.upm.es/download/vnx/filesystems/root_fs_ubuntu-10.10-gui-v01.qcow2.bz2
    bunzip2 root_fs_ubuntu-10.10-gui-v01.qcow2.bz2
    ln -s root_fs_ubuntu-10.10-gui-v01.qcow2 root_fs_ubuntu-gui
    
    # freebsd server
    wget -N http://idefix.dit.upm.es/download/vnx/filesystems/root_fs_freebsd-8.1-v01.qcow2.bz2
    bunzip2 root_fs_freebsd-8.1-v01.qcow2.bz2
    ln -s root_fs_freebsd-8.1-v01.qcow2 root_fs_freebsd
    
    # freebsd gui
    wget -N http://idefix.dit.upm.es/download/vnx/filesystems/root_fs_freebsd-8.1-gui-v01.qcow2.bz2
    bunzip2 root_fs_freebsd-8.1-gui-v01.qcow2.bz2
    ln -s root_fs_freebsd-8.1-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
    
  • Additionally, if you plan to use VNUML root filesystem:
  • # VNUML root_fs_tutorial and kernel
    cd /usr/share/vnx/filesystems
    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


Additional install steps for Dynamips support

  • Install Dynamips and Dynagen:
apt-get install dynamips dynagen
#!/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
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.

Additional install steps for Olive support

Several additional steps are needed to support Olive (Juniper) routers in VNX scenarios:

Installation over Fedora 11 (Draft)

Follow this steps to install VNX over Fedora 11:

Additional install steps for Dynamips support

  • Install Dynamips and Dynagen:
wget http://downloads.sourceforge.net/project/dyna-gen/dynamips%20Linux%20RPM/0.2.8-RC2/dynamips-0.2.8RC2-1.i386.rpm
rpm -i dynamips-0.2.8RC2-1.i386.rpm
wget http://downloads.sourceforge.net/project/dyna-gen/dynagen%20source%20_%20Linux/dynagen%200.11.0/dynagen-0.11.0-1.fc9.noarch.rpm
rpm -i dynagen-0.11.0-1.fc9.noarch.rpm
  • Set execution permissions for the script and add it to system start-up:
chkconfig --add dynamips
/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
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.

Additional install steps for Olive support

Several additional steps are needed to support Olive (Juniper) routers in VNX scenarios: