From VNX
Jump to: navigation, search

VNX Installation over Ubuntu

This section describes the procedure for manually installing VNX over Ubuntu 12.04, 12.10 and 13.04.

Open a root shell window and follow these steps:

  • Install all packages required (basic development, virtualization, perl libraries and auxiliar packages):
  • sudo apt-get update
    sudo apt-get install qemu-kvm libvirt-bin vlan xterm bridge-utils screen virt-manager \
     virt-viewer uml-utilities graphviz genisoimage gnome-terminal tree \
     curl w3m picocom expect lxc wmctrl \
     libnetaddr-ip-perl libxml-libxml-perl libxml-tidy-perl libappconfig-perl \
     libreadonly-perl libterm-readline-perl-perl libnet-pcap-perl libnet-ipv6addr-perl \
     libsys-virt-perl libnet-telnet-perl liberror-perl libexception-class-perl \
     libxml-dom-perl libdbi-perl libmath-round-perl libio-pty-perl libnet-ip-perl \
     libxml-checker-perl libxml-parser-perl libfile-homedir-perl 
  • Tune libvirt configuration to work with VNX. In particular, edit /etc/libvirt/qemu.conf file and set the following parameters:
  • security_driver = "none"
    user = "root"
    group = "root"
    cgroup_device_acl = [
       "/dev/null", "/dev/full", "/dev/zero",
       "/dev/random", "/dev/urandom",
       "/dev/ptmx", "/dev/kvm", "/dev/kqemu",
       "/dev/rtc", "/dev/hpet", "/dev/net/tun",

    and restart libvirtd for the changes to take effect:

    restart libvirt-bin
  • Check that libvirt is running correctly, for example, executing:
  • virsh list
    virsh capabilities

    Note: Have a look at this document in case you get an error similar to this one: virsh: /usr/lib/ version LIBVIRT_PRIVATE-XXX not found (required by virsh)

  • Only for Ubuntu 12.10: serial lines support seems to be broken in qemu-kvm v1.2 package provided in 12.10, so you need to downgrade to v1.0.1.
  • apt-get install zlib1g-dev libglib2.0-dev
    mkdir src
    cd src
    tar xfvz qemu-kvm-1.0.1.tar.gz
    cd qemu-kvm-1.0.1
    ./configure --prefix=/usr
    make install
    service libvirt-bin restart
  • 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 R3640     # type 'no' to exit the config wizard and wait 
                  # for the router to completely start 
    idlepc get R3640
    Once you know the idlepc value for your system, include it in /etc/vnx.conf file.