Difference between revisions of "Vnx-install-centos"

From VNX
Jump to: navigation, search
 
(10 intermediate revisions by the same user not shown)
Line 22: Line 22:
 
  yum -y install perl-Error perl-XML-DOM perl-NetAddr-IP perl-Readonly  
 
  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-TermReadKey perl-Exception-Class graphviz perl-AppConfig
  yum -y install perl-Sys-Virt
+
  yum -y install perl-Sys-Virt tree libio-pty-perl curl w3m picocom expect
 
+
  yum -y install perl-IO-Tty perl-Time-HiRes pv
--- Fallan
 
roxterm
 
  yum install device-mapper-devel uml_utilities
 
perl-ExtUtils-MakeMaker
 
 
 
 
<li>Install uml_utilities manually (not rpm package found for CentOS 5):</li>
 
<li>Install uml_utilities manually (not rpm package found for CentOS 5):</li>
 
  mkdir src
 
  mkdir src
Line 60: Line 55:
 
  mkdir /tmp/vnx-update
 
  mkdir /tmp/vnx-update
 
  cd /tmp/vnx-update
 
  cd /tmp/vnx-update
  wget -N http://idefix.dit.upm.es/download/vnx/vnx-latest.tgz
+
  wget -N http://vnx.dit.upm.es/vnx/vnx-latest.tgz
 
  tar xfvz vnx-latest.tgz
 
  tar xfvz vnx-latest.tgz
 
  cd vnx-*
 
  cd vnx-*
Line 66: Line 61:
  
 
<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.sample /etc/vnx.conf
+
  mv /usr/share/vnx/etc/vnx.conf.sample /etc/vnx.conf
  
 
<li>Disable SELINUX. If not disabled, virtual machines fail to start with:</li>
 
<li>Disable SELINUX. If not disabled, virtual machines fail to start with:</li>
Line 84: Line 79:
 
<li>Disable host firewall or, alternatively, allow the services you want to use among virtual machines.</li>
 
<li>Disable host firewall or, alternatively, allow the services you want to use among virtual machines.</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>
+
<li>Download root file systems from http://idefix.dit.upm.es/download/vnx/filesystems and install them following these [[Vnx-install-root_fs|instructions]]</li>
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
 
 
 
 
</ul>
 
</ul>
  
Line 140: Line 108:
 
Once you know the idle-pc value for your system, include it in /etc/vnx.conf file.
 
Once you know the idle-pc value for your system, include it in /etc/vnx.conf file.
  
 +
<!-- Not needed. bios-olive.bin file installed with vnx
 
=== Additional install steps for Olive support ===
 
=== Additional install steps for Olive support ===
  
Line 154: Line 123:
  
  
 
+
-->
  
  

Latest revision as of 13:38, 6 March 2015

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 libio-pty-perl curl w3m picocom expect
    yum -y install perl-IO-Tty perl-Time-HiRes pv
    
  • 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://vnx.dit.upm.es/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 /usr/share/vnx/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.