Difference between revisions of "Vnx-install"

From VNX
Jump to: navigation, search
(Installation over Fedora 11 (Draft))
(Manual Installation)
 
(38 intermediate revisions by the same user not shown)
Line 3: Line 3:
 
=== Requirements ===
 
=== 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 ===
 
 
* [[vnx-install-ubuntu|Installation of VNX over Ubuntu (v11.04, 10.10, 10.04 and 9.10)]]
 
* [[vnx-install-fedora|Installation of VNX over Fedora (11 and 14)]]
 
* [[vnx-install-centos|Installation of VNX over CentOS (5.6)]]
 
 
== 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:
 
 
<ul>
 
<ul>
<li>Install the system from the CentOS 5.6 DVD with the options you want. Restart the system and update all packages with:</li>
+
<li>Modern Linux distribution (Ubuntu 14.04 or newer recommended)</li>
yum update
+
<li>Processor with '''virtualization support''' (only needed if you use KVM virtual machines; not needed if you only use User-Mode-Linux or dynamips). You can check whether your processor has support for virtualization extensions using:</li>
 
 
<li>Once installation is finished, configure the RPMForge repository following the procedure described [http://wiki.centos.org/AdditionalResources/Repositories/RPMForge?action=show&redirect=Repositories%2FRPMForge#head-5aabf02717d5b6b12d47edbc5811404998926a1b here]:</li>
 
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
 
 
 
<li>Install packages:</li>
 
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
 
 
 
<li>Install uml_utilities manually (not rpm package found for CentOS 5):</li>
 
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 ..
 
 
 
<li>Install libvirt 0.8.8:</li>
 
/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
 
 
 
<li>Add symbolic link for kvm:</li>
 
ln -s /usr/bin/qemu /usr/bin/kvm
 
 
 
<li>Install VNX:</li>
 
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
 
 
 
<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
 
 
 
<li>Disable SELINUX. If not disabled, virtual machines fail to start with:</li>
 
<pre>
 
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
 
</pre>
 
 
 
<li>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:</li>
 
<pre>
 
virsh  console ubuntu
 
error:Falló al obtener nombre del host local
 
</pre>
 
 
 
<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>
 
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>
 
 
 
=== 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
 
 
 
* Calculate the idle-pc value for your computer following the procedure in http://dynagen.org/tutorial.htm:
 
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:
 
 
 
 
<ul>
 
<ul>
 +
<li>'''kvm-ok''' command if available in your system:</li>
 +
# kvm-ok
 +
INFO: Your CPU supports KVM extensions
 +
INFO: /dev/kvm exists
 +
KVM acceleration can be used
 +
<li>Manually, executing the following command:</li>
 +
egrep '(vmx|svm)' --color=always /proc/cpuinfo
 +
If you see the word vmx (for Intel processors) or svm (for AMD processors) in <strong><span style="color:red">red</span></strong>, your processor has virtualization support.
  
<li>Download old qemu bios from 0.10.6 version and copy it to /usr/share/qemu directory:</li>
+
'''IMPORTANT''': Be aware that virtualization extensions are controled from the BIOS. Even if you see the vmx/svm flag you will have to access your BIOS setup and check that virtualization support is enabled. If you get the following error message:
  wget http://downloads.sourceforge.net/project/kvm/qemu-kvm/0.10.6/qemu-kvm-0.10.6.tar.gz
+
  FATAL: Error inserting kvm_intel (...): Operation not supported
tar xfvz qemu-kvm-0.10.6.tar.gz
+
it probably means that virtualization support is disabled in your BIOS setup.
cp qemu-kvm-0.10.6/pc-bios/bios.bin /usr/share/qemu/bios-0.10.6.bin
 
 
 
 
</ul>
 
</ul>
 
+
<li>2 Gb of Memory</li>
 
+
<li>10 Gb of disk (depends mainly on the number of root-file-systems used)</li>
 
 
 
 
 
 
<!-- COSAS ANTIGUAS -->
 
 
 
<!--li>Modificar vnumlparser.pl, sustituyendo en la función mode_t la línea en ):</li>
 
  !$execution->execute ($bd->get_binaries_path_ref->{"modprobe"} . " tun") or $execution->smartdie ("module tun can not be initialized: $!");
 
 
 
por:
 
 
 
  if (! -e "/dev/net/tun") {
 
      !$execution->execute ($bd->get_binaries_path_ref->{"modprobe"} . " tun") or $execution->smartdie ("module tun can not be initialized: $!");
 
  }
 
 
 
Explicación: el módulo tun se ha integrado en el kernel a partir de la 10.04, por lo que no es necesario cargarlo como hasta ahora mediante "modprobe tun". El cambio anterior simplemente comprueba si existe el dispositivo /dev/net/tun y carga el modulo en caso de que no exista.
 
-->
 
 
 
 
 
<!--li>Modificar vnumlparser.pl, sustituyendo en la función mode_t la línea en ):</li>
 
  !$execution->execute ($bd->get_binaries_path_ref->{"modprobe"} . " tun") or $execution->smartdie ("module tun can not be initialized: $!");
 
 
 
por:
 
 
 
  if (! -e "/dev/net/tun") {
 
      !$execution->execute ($bd->get_binaries_path_ref->{"modprobe"} . " tun") or $execution->smartdie ("module tun can not be initialized: $!");
 
  }
 
 
 
Explicación: el módulo tun se ha integrado en el kernel a partir de la 10.04, por lo que no es necesario cargarlo como hasta ahora mediante "modprobe tun". El cambio anterior simplemente comprueba si existe el dispositivo /dev/net/tun y carga el modulo en caso de que no exista.
 
-->
 
 
 
<!--
 
Pasos a seguir para instalar VNX sobre Ubuntu 9.10.
 
 
 
'''Nota importante''': se han detectado importantes problemas de prestaciones cuando se utiliza el sistema de ficheros ext4 con Ubuntu 9.10. Por ello, y hasta que se localice el origen de dichas ineficiencias, se recomienda utilizar ext3.
 
<ul>
 
 
 
<li> Instalar Ubuntu 9.10 y actualizar con:</li>
 
  apt-get update; apt-get dist-upgrade
 
-->
 
<!--
 
<li>Añadir repositorios VNUML a /etc/apt/sources.lst:</li>
 
  echo "deb http://jungla.dit.upm.es/~vnuml/debian binary/" >> /etc/apt/sources.list
 
  echo "deb http://jungla.dit.upm.es/~vnuml/debian-testing binary/" >> /etc/apt/sources.list
 
-->
 
<!--
 
<li>Install paquetes básicos de desarrollo, paquetes de virtualización (qemu-kvm, libvirt, vnuml) y librerías y paquetes auxiliares</li>
 
apt-get update
 
apt-get install build-essential qemu-kvm libvirt-bin libvirt-dev \
 
  virt-manager virt-viewer vlan xterm bridge-utils screen uml-utilities                      \
 
  libxml-checker-perl libxml-parser-perl libnetaddr-ip-perl libnet-pcap-perl    \
 
  libnet-ipv6addr-perl liberror-perl libexception-class-perl  libxml-libxml-perl  \
 
  libxml2-dev libgnutls-dev libdevmapper-dev libterm-readline-perl-perl
 
 
 
 
 
 
 
curl vnuml linux-um
 
 
 
<li>Si se usa la versión de Ubuntu de 64 bits hay que instalar las librerías de compatibilidad de 32 bits:</li>
 
  apt-get install ia32-libs
 
 
 
<li>Install qemu-kvm version 0.12.4 (version 0.11 which comes as apackage in 9.10 provokes hanging problems in Windows virtual machines when executing commands -something relates apparently with mounting cdroms in vms-):</li>
 
  wget http://sourceforge.net/projects/kvm/files/qemu-kvm/0.11.1/qemu-kvm-0.11.1.tar.gz/download
 
  tar xfvz qemu-kvm-0.11.1.tar.gz
 
  cd qemu-kvm-0.11.1
 
  ./configure --prefix=/usr && make && make install
 
  ln -s /usr/bin/qemu-system-x86_64 /usr/bin/kvm
 
Editar /etc/modules y añadir:
 
  kvm
 
  kvm_intel
 
 
 
wget http://sourceforge.net/projects/kvm/files/kvm-kmod/2.6.31.6b/kvm-kmod-2.6.31.6b.tar.bz2/download
 
 
 
<li>Instalar libvirt 0.8.0:</li>
 
  /etc/init.d/libvirt-bin stop
 
  wget http://libvirt.org/sources/libvirt-0.8.0.tar.gz
 
  tar xfvz libvirt-0.8.0.tar.gz
 
  cd libvirt-0.8.0
 
  ./configure --prefix=/usr && make && make install
 
  /etc/init.d/libvirt-bin start
 
 
 
<li> Instalar la librería perl de acceso a libvirt (Sys::Virt) desde CPAN (dicha librería no esta disponible como paquete para Ubuntu 9.10):</li>
 
-->
 
<!--  wget http://search.cpan.org/CPAN/authors/id/D/DA/DANBERR/Sys-Virt-0.2.2.tar.gz
 
tar xfvz Sys-Virt-0.2.2.tar.gz
 
cd Sys-Virt-0.2.2
 
perl Makefile.PL
 
make install
 
-->
 
<!--
 
  perl -MCPAN -e "CPAN::Shell->force(qw(install Sys::Virt));"
 
Nota: constestar YES a la pregunta "Would you like me to configure as much as posible automatically?" y a "Is it OK to try to connect to the Internet?"
 
 
 
<li>Instalar rootfilesystem de VNUML, enlaces del kernel y crear clave rsa:</li>
 
  cd /usr/share/vnuml/filesystems
 
  wget http://www.dit.upm.es/vnuml/download/scripts/root-fs-installer
 
  perl root-fs-installer
 
  cd ../kernels
 
  ln -s linux-2.6.28.10-1m linux
 
  ssh-keygen -t rsa1
 
 
 
<li>Instalar VNX:</li>
 
wget -N http://idefix.dit.upm.es/download/vnx/vnx-0.12b.tgz
 
tar xfvz vnx-0.12b.tgz
 
cd vnx-0.12b
 
./install-vnx
 
 
</ul>
 
</ul>
  
Notas:
+
=== Installing VNX from Packages ===
http://www.ubuntu-es.org/node/128867
 
  175  wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v2.6.32.9/linux-headers-2.6.32-02063209_2.6.32-02063209_all.deb
 
  176  http://kernel.ubuntu.com/~kernel-ppa/mainline/v2.6.32.9/linux-image-2.6.32-02063209-generic_2.6.32-02063209_amd64.deb
 
  177  wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v2.6.32.9/linux-image-2.6.32-02063209-generic_2.6.32-02063209_amd64.deb
 
  178  wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v2.6.32.9/linux-headers-2.6.32-02063209-generic_2.6.32-02063209_amd64.deb
 
-->
 
  
<!--
+
Not available yet.
=== Sobre Ubuntu 8.04 ===
 
  
Pasos a seguir para instalar VNX sobre Ubuntu 8.04:
+
=== Manual Installation ===
<ul>
 
  
<li> Instalar Ubuntu 8.04 y actualizar con:</li>
+
* [[vnx-install-ubuntu3|Installation of VNX over Ubuntu (13.*, 14.*, 15.*, 16.*, 17.* and 18.*)]]
  apt-get update; apt-get dist-upgrade
+
* [[vnx-install-ubuntu2|Installation of VNX over Ubuntu (12.04, 12.10 and 13.04)]]
Rearrancar la máquina en caso de que se actualice la versión del kernel.
+
* [[vnx-install-ubuntu|Installation of VNX over Ubuntu (11.04, 10.10, 10.04 and 9.10)]]
 
+
* [[vnx-install-fedora23|Installation of VNX over Fedora (23)]]
<li> Añadir repositorio VNUML a /etc/apt/sources.lst:</li>
+
* [[vnx-install-fedora|Installation of VNX over Fedora (11 and 14)]]
  echo "deb http://jungla.dit.upm.es/~vnuml/debian binary/" >> /etc/apt/sources.list
+
* [[vnx-install-centos|Installation of VNX over CentOS (6.2 and 5.6)]]
  echo "deb http://jungla.dit.upm.es/~vnuml/debian-testing binary/" >> /etc/apt/sources.list
+
* [[vnx-install-root_fs|Downloading VNX root filesystems]]
 
 
<li> Instalar paquetes:</li>
 
apt-get update
 
apt-get install virt-manager virt-viewer build-essential            \
 
    libxml-libxml-perl vncviewer vlan xterm bridge-utils screen        \
 
    curl vnuml linux-um libterm-readline-perl-perl zlib-bin zlib1g-dev \
 
    libxen3-dev libxml2-dev libgnutls-dev libsasl2-dev libsdl1.2-dev  \
 
    libdevmapper-dev dnsmasq xbase-clients pkg-config
 
 
 
<li>Si se usa la versión de Ubuntu de 64 bits hay que instalar las librerías de compatibilidad de 32 bits:</li>
 
  apt-get install ia32-libs
 
 
 
<li>Instalar qemu-kvm version 0.11.1 (la version 0.12.2 da errores):</li>
 
  wget http://sourceforge.net/projects/kvm/files/qemu-kvm/0.11.1/qemu-kvm-0.11.1.tar.gz/download
 
  tar xfvz qemu-kvm-0.11.1.tar.gz
 
  cd qemu-kvm-0.11.1
 
  ./configure --prefix=/usr && make && make install
 
  ln -s /usr/bin/qemu-system-x86_64 /usr/bin/kvm
 
Editar /etc/modules y añadir:
 
  kvm
 
  kvm_intel
 
 
 
<li>Instalar libvirt 0.7.6:</li>
 
  apt-get install libvirt-bin
 
  /etc/init.d/libvirt-bin stop
 
  wget http://libvirt.org/sources/libvirt-0.7.6.tar.gz
 
  tar xfvz libvirt-0.7.6.tar.gz
 
  cd libvirt-0.7.6
 
  ./configure --prefix=/usr --without-storage-disk && make && make install
 
  /etc/init.d/libvirt-bin start
 
 
 
<li>Instalar librería perl de acceso a libvirt (Sys::Virt) mediante CPAN (no está disponible como paquete ubuntu)</li>
 
perl -MCPAN -e "CPAN::Shell->force(qw(install Sys::Virt));"
 
Note: answer NO to the question "Are you ready for manual configuration?"
 
 
 
<li>Instalar rootfilesystem de VNUML, enlaces del kernel y crear clave rsa:</li>
 
  cd /usr/share/vnuml/filesystems
 
  wget http://www.dit.upm.es/vnuml/download/scripts/root-fs-installer
 
  perl root-fs-installer
 
  cd ../kernels
 
  ln -s linux-2.6.28.10-1m linux
 
  ssh-keygen -t rsa1
 
 
 
<li>Instalar VNX:</li>
 
wget -N http://idefix.dit.upm.es/download/vnx/vnx-0.12b.tgz
 
tar xfvz vnx-0.12b.tgz
 
cd vnx-0.12b
 
./install-vnx
 
</ul>
 
-->
 

Latest revision as of 11:02, 13 November 2018

VNX Installation Guides

Requirements

  • Modern Linux distribution (Ubuntu 14.04 or newer recommended)
  • Processor with virtualization support (only needed if you use KVM virtual machines; not needed if you only use User-Mode-Linux or dynamips). You can check whether your processor has support for virtualization extensions using:
    • kvm-ok command if available in your system:
    • # kvm-ok
      INFO: Your CPU supports KVM extensions
      INFO: /dev/kvm exists
      KVM acceleration can be used
      
    • Manually, executing the following command:
    • egrep '(vmx|svm)' --color=always /proc/cpuinfo
      

      If you see the word vmx (for Intel processors) or svm (for AMD processors) in red, your processor has virtualization support.

      IMPORTANT: Be aware that virtualization extensions are controled from the BIOS. Even if you see the vmx/svm flag you will have to access your BIOS setup and check that virtualization support is enabled. If you get the following error message:

      FATAL: Error inserting kvm_intel (...): Operation not supported
      

      it probably means that virtualization support is disabled in your BIOS setup.

  • 2 Gb of Memory
  • 10 Gb of disk (depends mainly on the number of root-file-systems used)

Installing VNX from Packages

Not available yet.

Manual Installation