Difference between revisions of "Vnx-install"

From VNUML-WIKI
Jump to: navigation, search
(Created page with '{{Title|VNX (Virtual Networks over X virtualization) v0.14 beta}} == Installation == === Installing on Ubuntu 10.04/9.10 === This section describes the procedure for installi…')
 
Line 8: Line 8:
 
<ul>
 
<ul>
  
<!--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 all packages required (basic development, virtualization, perl libraries and auxiliar packages):</li>
 
<li>Install all packages required (basic development, virtualization, perl libraries and auxiliar packages):</li>
 
  apt-get update
 
  apt-get update
Line 52: Line 48:
 
</ul>
 
</ul>
  
<!--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>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>Install VNX:</li>
 
<li>Install VNX:</li>
 
  wget -N http://www.dit.upm.es/vnx/download/vnx-0.14b.tgz
 
  wget -N http://www.dit.upm.es/vnx/download/vnx-0.14b.tgz
Line 78: Line 54:
 
  ./install_vnx
 
  ./install_vnx
  
<li>Download root file systems 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 copy them to /usr/share/vnx/filesystems directory:</li>
 +
cd /usr/share/vnx/filesystem
 +
 
  ...
 
  ...
 
</ul>
 
</ul>
Line 85: Line 63:
 
  apt-get install kvm-pxe
 
  apt-get install kvm-pxe
  
<!--
 
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>
 
 
Notas:
 
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
 
-->
 
 
<!--
 
=== Sobre Ubuntu 8.04 ===
 
 
Pasos a seguir para instalar VNX sobre Ubuntu 8.04:
 
<ul>
 
 
<li> Instalar Ubuntu 8.04 y actualizar con:</li>
 
  apt-get update; apt-get dist-upgrade
 
Rearrancar la máquina en caso de que se actualice la versión del kernel.
 
 
<li> Añadir repositorio 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> 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>
 
-->
 
  
 
=== Installing on Fedora 11 ===
 
=== Installing on Fedora 11 ===
Line 388: Line 218:
  
 
</ul>
 
</ul>
 +
 +
 +
<!-- 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>
 +
 +
Notas:
 +
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
 +
-->
 +
 +
<!--
 +
=== Sobre Ubuntu 8.04 ===
 +
 +
Pasos a seguir para instalar VNX sobre Ubuntu 8.04:
 +
<ul>
 +
 +
<li> Instalar Ubuntu 8.04 y actualizar con:</li>
 +
  apt-get update; apt-get dist-upgrade
 +
Rearrancar la máquina en caso de que se actualice la versión del kernel.
 +
 +
<li> Añadir repositorio 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> 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>
 +
-->

Revision as of 16:19, 4 October 2010

VNX (Virtual Networks over X virtualization) v0.14 beta

Installation

Installing on Ubuntu 10.04/9.10

This section describes the procedure for installing VNX over Ubuntu 10.04 or 9.10. Open a root shell window and follow these steps:

  • Install all packages required (basic development, virtualization, perl libraries and auxiliar packages):
  • apt-get update
    apt-get install build-essential qemu-kvm libvirt-bin vlan xterm bridge-utils \
    screen virt-manager virt-viewer libxml-checker-perl \
    libxml-parser-perl libnetaddr-ip-perl libnet-pcap-perl libnet-ipv6addr-perl \
    liberror-perl libexception-class-perl uml-utilities libxml-libxml-perl \
    libxml2-dev libgnutls-dev libdevmapper-dev libterm-readline-perl-perl 
    

    Note: for Ubuntu 9.04 change "qemu-kvm" package by "qemu kvm"

  • If you use 64 bits version of Ubuntu, install 32 bits compatibility libraries:
  •  apt-get install ia32-libs
    
  • Install libvirt 0.7.5:
  •  /etc/init.d/libvirt-bin stop
     wget http://libvirt.org/sources/libvirt-0.7.5.tar.gz
     tar xfvz libvirt-0.7.5.tar.gz
     cd libvirt-0.7.5
     ./configure --without-xen --prefix=/usr && make && make install
     /etc/init.d/libvirt-bin start
    

    NOTE: By now, libvirt 0.7.5 is the only version of libvirt known to work with VNX.

    NOTE2: libvirt 0.7.5 is available as a package in Ubuntu 10.04. However it has some problems related with the Apparmor profiles configured for libvirt. If you disable Apparmor (with "/etc/init.d/apparmor stop"), VNX will work with libvirt 0.7.5 installed as package, however we recommend to download and compile it as described above, in order to maintain Apparmor in your system.

  • Install Sys::Virt perl module:
  • Install VNX:
  • wget -N http://www.dit.upm.es/vnx/download/vnx-0.14b.tgz
    tar xfvz vnx-0.14b.tgz
    cd vnx-0.14b
    ./install_vnx
    
  • 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/filesystem
    
    ...
    

NOTE for Ubuntu 10.04.1: It seems that an additional package has to be installed:

apt-get install kvm-pxe


Installing on Fedora 11

Follow tis steps to install VNX over Fedora 11:

  • Instalar VNUML sobre Fedora 11 siguiendo la receta en http://www.dit.upm.es/vnumlwiki/index.php/Fedora11
  • Instalar paquetes y librerías necesarias:
  • yum install qemu-kvm libvirt virt-manager virt-viewer perl-XML-LibXML perl-Sys-Virt
    yum -y install bridge-utils readline-devel perl-Module-Build screen expat-devel libpcap-devel  
    yum -y install perl-Net-Pcap perl-NetAddr-IP perl-Net-IPv6Addr perl-XML-DOM perl-Exception-Class
    yum -y install perl-TermReadKey perl-Error perl-CPAN uml_utilities xterm tunctl
    
  • Install XML::Checker perl library:
  • perl -MCPAN -e shell
    install XML::Checker
    
  • Add symbolic link for kvm:
  • ln -s /usr/bin/qemu-kvm /usr/bin/kvm
    
  • Instalar VNX:
  • 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
    
  • Deshabilitar el firewall o, alternativamente, configurar los interfaces tipo "tun" como confiables (Sistema->Firewall->Interfaces Confiables").

Testing VNX with example scenarios

Several example scenarios are distributed together with VNX (see /usr/share/vnx/examples directory).

Con la distribución provisional de VNX se proporcionan dos nuevos escenarios de ejemplo para mostrar las capacidades para crear máquinas virtuales basadas en Windows XP:

  • root_fs_XXX.xml,
  • simple-XXX.xml: simple scenarios made of one virtual machine without network interfaces.
  • tutorial_root1-xp.xml, basado en el escenario del tutorial de VNUML (http://www.dit.upm.es/vnumlwiki/index.php/Tutorial) y compuesto por dos máquinas virtuales Linux (uml1 y uml3) y tres Windows XP (uml2, uml4 y uml5).

To test the scenarios:

  • Open a root shell from the graphical console of the host machine. If you are not sat in front of host's console you can access it using ssh with X-forwarding activated. For example, from a Unix machine you can use:
  •   ssh -X <host-addr>
    

    In this case, it is recommended to test that X-forwarding is working by launching a "xterm" or "xeyes" application and seeing that the application window is correctly launched.

    Es importante además que la conectividad entre la máquina cliente y el servidor donde se ejecuta VNX sea buena, ya que el acceso a las consolas de las máquinas virtuales se hace impracticable en caso contrario.

Simple scenarios

  • Start simple scenarios by means of:
  • vnx -f /usr/share/vnx/examples/simple_xp.xml -v -u root --create
    

    Just after the execution, you will see the console of the Windows XP machine starting. Once the machine has completely started, the autoconfiguration daemon will configure it (the name and network interfaces are configured in general; only the name in the simple example) and restart it for the changes to take effect.

    After the restart, the virtual machine will be available for interacting with it.

    Note: virt-viewer console application "captures" the mouse when interacting with the virtual machines. You have to type "Ctrl-Alt" to release the mouse.

  • To stop the scenario preserving the changes made:
  • vnx -f /usr/share/vnx/examples/simple_xp.xml -v -u root --shutdown
    
  • To stop the scenario discarding the changes made:
  • vnx -f /usr/share/vnx/examples/simple_xp.xml -v -u root --destroy
    

Tutorial scenarios

  • To start the tutorial scenario with linux and XP machines just type:
  • vnx -f tutorial_root1_xp.xml -v -u root --create
    
  • Once the scenario has completely started (remenber that the XP machines have to be restarted for the autoconfiguration to complete), you can test the network connectivity, for example, accesing uml1 machine and tracing to uml5: traceroute -n 10.0.2.2
  • Para parar y rearrancar una máquina concreta sin perder las modificaciones realizadas: vnx -d examples/tutorial_root1_xp.xml -v -u root -M uml4 vnx -t examples/tutorial_root1_xp.xml -v -u root -M uml4
  • Para parar y rearrancar una máquina concreta creando una copia nueva desde el rootfs original: vnx -P examples/tutorial_root1_xp.xml -v -u root -M uml4 vnx -t examples/tutorial_root1_xp.xml -v -u root -M uml4

Troubleshooting

Comprobaciones:

  • Comprobar que el procesador tiene las extensiones de virtualización:
  • egrep '(vmx|svm)' --color=always /proc/cpuinfo
    

    Si aparece la la palabra vmx (para Intel) o svm (para AMD) coloreada, es que el procesador tiene soporte de virtualización.

  • Comprobar que KVM funciona con:
  •  modprobe kvm
     modprobe kvm_intel
    
    • Arrancar con consola SDL
    •  kvm -sdl -hda /usr/share/vnuml/filesystems/linux-0.2.img -m 256    
      
    • Arrancar con consola VNC:
    •  echo "Type 'vncviewer ${DISPLAY%.0}' to access vnc console"; kvm -vnc ${DISPLAY#*localhost} -hda /usr/share/vnuml/filesystems/linux-0.2.img -m 256
      
  • Nota: si al ejecutar el comando kvm devuelve el mensaje de error:
  • open /dev/kvm: No such file or directory. 
    Could not initialize KVM, will disable KVM support" 
    

    es que el sistema operativo no detecta el soporte de virtualización. Si se ha comprobado que el procesador soporta virtualización, puede ser que ésta esté deshabilitada en la BIOS.

  • Comprobar que libvirt+KVM funciona:
    • Arrancando máquina virtual linux:
    •  cd /usr/share/vnuml/examples/
       virsh create root_fs_linux.xml 
       virt-viewer Linux
      
    • Arrancando máquina virtual Windows XP:
    •  cd /usr/share/vnuml/examples/
       virsh create root_fs_winxp.xml 
       virt-viewer WinXP
      
    • Para parar las máquinas utilizar:
    •  virsh shutdown Linux
       virsh shutdown WinXP
      
    • En caso de problemas relacionados con la configuración de red:
    •  killall dnsmasq
       virsh net-start default
      
    • En caso de que una máquina virtual creada con libvirt no arranque, se pueden consultar la causa en el fichero de trazas:
    • cat /var/log/libvirt/qemu/Linux.log 
      cat /var/log/libvirt/qemu/WinXP.log
      
    • El estado de las máquinas virtuales creadas con libvirt se puede ver desde la consola gráfica:
    • virt-manager
      

      o desde la shell de libvirt:

      virsh list
      
  • Comprobar funcionamiento VNUML básico:
  •  cd /usr/share/vnuml/examples
    

    Editar tutorial_root2.xml y añadir "<mem>64M</mem>" entre <filesystem...> y <kernel...>

     vnumlparser.pl -t tutorial_root2.xml -v -u root -Z
    

Errores conocidos

  • Ubuntu 9.10: si al arrancar máquinas virtuales da el error:
  • libvirt error code: 38, message: monitor socket did not show up.: Connection refused
    

    y en el log (/var/log/libvirt/qemu/*.log) se ve al final el mensaje:

    qemu: could not open disk image /root/.vnuml/simulations/simple/vms/host1/fs/root_cow_fs
    

    hay que rearrancar el demonio de libvirt mediante:

    /etc/init.d/libvirt-bin restart
    

    ver https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/503376