Vnx-install-centos

From VNX
Revision as of 23:49, 27 August 2011 by David (talk | contribs)
Jump to: navigation, search

VNX Installation over CentOS

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 tree
    
    --- 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 install them following these instructions

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: