Vnx-install

From VNX
Revision as of 21:52, 13 July 2011 by David (talk | contribs) (Installation over Fedora 11 (Draft))
Jump to: navigation, search

VNX Installation Guides

Requirements

  • Modern Linux distribution (Ubuntu 11.04/10.10/10.04 recommended)
  • Processor with virtualization support
  • 2 Gb of Memory
  • 10 Gb of disk (depends mainly on the numbre of root-file-systems used)

Installing VNX from Packages

Not available yet.

Manual Installation

Installation over CentOS 5.6 (Draft)

Recipe tested over a Dell Optiplex 745 installing Cent0S 5.6 64 bits from DVD.

Follow this steps to install VNX over CentOS 5.6:

  • Install the system from the CentOS 5.6 DVD with the options you want. Restart the system and update all packages with:
  • yum update
    
  • Once installation is finished, configure the RPMForge repository following the procedure described here:
  • wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.i386.rpm
    rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt
    rpm -K rpmforge-release-0.5.2-2.el5.rf.*.rpm
    rpm -i rpmforge-release-0.5.2-2.el5.rf.*.rpm
    yum update
    
  • Install packages:
  • yum -y groupinstall "Development Tools"
    yum -y install qemu kvm kmod-kvm libvirt virt-manager virt-viewer
    yum -y install perl-XML-LibXML perl-XML-Parser perl-Net-Telnet tunctl screen
    yum -y install wget libxml2-devel gnutls-devel  perl-Net-Pcap perl-Net-IPv6Addr 
    yum -y install perl-Error perl-XML-DOM perl-NetAddr-IP perl-Readonly 
    yum -y install perl-TermReadKey perl-Exception-Class graphviz perl-AppConfig
    yum -y install perl-Sys-Virt
    
    --- Fallan 
    roxterm
    yum install device-mapper-devel uml_utilities
    perl-ExtUtils-MakeMaker
    
  • Install uml_utilities manually (not rpm package found for CentOS 5):
  • mkdir src
    cd src
    wget http://user-mode-linux.sourceforge.net/uml_utilities_20070815.tar.bz2 
    tar xfvj uml_utilities_20070815.tar.bz2 
    cd tools-20070815/
    yum -y install readline-devel ncurses-devel fuse-devel
    make
    make install
    cd ..
    
  • Install libvirt 0.8.8:
  • /etc/init.d/libvirtd stop
    wget http://libvirt.org/sources/libvirt-0.8.8.tar.gz
    tar xfvz libvirt-0.8.8.tar.gz
    cd libvirt-0.8.8
    ./configure --without-xen --prefix=/usr && make && make install
    rm -f /usr/lib/libvirt.so.0
    ln -s /usr/lib/libvirt.so.0.8.8 /usr/lib/libvirt.so.0
    rm -f /usr/lib/libvirt-qemu.so.0
    ln -s /usr/lib/libvirt-qemu.so.0.8.8 /usr/lib/libvirt-qemu.so.0 
    rm -f /usr/lib64/libvirt*
    ln -s /usr/lib/libvirt* /usr/lib64/
    /etc/init.d/libvirtd start
    
  • Add symbolic link for kvm:
  • ln -s /usr/bin/qemu /usr/bin/kvm
    
  • 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
    
  • Disable SELINUX. If not disabled, virtual machines fail to start with:
  • Connecting to qemu:///system hypervisor...OK
    libvirt error code: 1, message: internal error Process exited while reading console log output: char device redirected to /dev/pts/4
    bind(unix:/root/.vnx/scenarios/simple_ubuntu/vms/ubuntu/ubuntu_socket): Permission denied
    chardev: opening backend "socket" failed
    
  • Check that the hostname is correctly configured (in /etc/hosts it has to appear in the 127.0.0.1 and ::1 lines). If not configured you could get the following error when accesing virtual machine consoles:
  • virsh  console ubuntu
    error:Falló al obtener nombre del host local
    
  • Disable host firewall or, alternatively, allow the services you want to use among virtual machines.
  • 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
    

Additional install steps for Dynamips support

  • Install Dynamips and Dynagen:
yum -y install libpcap
wget http://downloads.sourceforge.net/project/dyna-gen/dynamips%20Linux%20RPM/0.2.8-RC2/dynamips-0.2.8RC2-1.i386.rpm
rpm --nodeps -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
  • Add dynamips to system start-up and start it manually for this time:
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

One additional step is needed to support Olive (Juniper) routers in VNX scenarios: