From VNX
Jump to: navigation, search

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
  • If you use 64 bits version of Ubuntu, install 32 bits compatibility libraries:
  •  apt-get install ia32-libs
  • For Ubuntu 11.04/10.10/10.04 an additional package has to be installed:
  • apt-get install kvm-pxe
  • Upgrade libvirt to 0.9.3:
  •  /etc/init.d/libvirt-bin stop
     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.

  • Install Sys::Virt perl module:
  • Install VNX:
  • mkdir /tmp/vnx-update
    cd /tmp/vnx-update
    rm -rf /tmp/vnx-update/vnx-*
    tar xfvz vnx-latest.tgz
    cd vnx-*
  • Create the VNX config file (/etc/vnx.conf). You just can move the sample config file:
  • mv /usr/share/vnx/etc/vnx.conf.sample /etc/vnx.conf
  • Download root file systems from and install them following these instructions
  • Additional install steps for Dynamips support

    • Install Dynamips and Dynagen:
    apt-get install dynamips dynagen
    # Start/stop the dynamips program as a daemon.
    # Provides:          dynamips
    # Default-Start:     2 3 4 5
    # Default-Stop:      0 1 6
    # Short-Description: Cisco hardware emulator daemon
    DESC="Cisco Emulator"
    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_of_proc -p $PIDFILE $DAEMON $NAME && exit 0 || exit $? 
            #status $NAME
    *)      log_action_msg "Usage: $SCRIPTNAME {start|stop|restart|status}"
            exit 2
    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/
    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.