VMWare GNU/Linux Ubuntu 6.06 Dapper Virtualizacion QEmu vmware-server-console Emulador Este tutorial, ofrece instrucciones paso a paso de como instalar y configurar la version gratuita de VMWare server en Ubuntu 6.06 Dapper Drake. Tambien instalaremos Windows XP SP2 en la maquina virtual sobre Ubuntu.
Introduccion:
Por su puesto estamos felices con nuestra distribucion GNU/Linux, pero a veces nos agarra un poco de nostalgia de esos viejos programas que usabamos en W32, por ejemplo cursos de ingles, enciclopedias, viejos jueguitos, etc. A veces, tenemos que hacer un determinado trabajo, y nos presionan ( por ejemplo en la facultad ) para usar tal o cual herramienta. Tenemos pilas de viejos CDs juntando polvo y que no hemos vuelto a usar desde hace varios años, desde que no usamos mas W32. Seguramente algunos programas los hemos podido correr con el emulador Wine, y algunos otros con el DosBox.
Yo por ejempo, he podido instalar el juego Starcraft con el Wine (en ambas maquinas Linuxeras, la de mi esposa y la mia) y hasta podemos jugar en red. Pero a veces algunos programas son muy complicados de instalar con el Wine, ademas no soy experto instalando con Wine. La verdad, no nos gusta eso de estar rebooteando en uno u otro sistema, y algunos (los mas osados) hemos cortado por lo sano y ya hace mucho tiempo que directamente hemos borrado para siempre la particion de W32 del disco
Ayer mi esposa me pregunto si no seria posible instalar esos viejos cursos de ingles. Y pense, que seguramente seria bastante complicado configurar uno por uno con Wine.
Aqui es donde entran los programas de virtualizacion de hardware, como Qemu, Xen, y el programa de esta nota: WMWare. A diferencia de Xen, VMWare nos permite tener acceso al escritorio o GUI del sistema operativo virtualizado, tanto sea al escritorio de Windows como al escritorio de Linux.
VMWare nos permite instalar un sistema operativo completo en una maquina virtual, la cual podemos prender, rebootear, formatear, etc. independientemente del sistema operativo principal que tengamos instalados en nuestra PC. Es como si el sistema operativo que hemos instalado en la maquina virtual corriera en una “ventana” aparte, que no afecta en nada al sistema principal. Por ejemplo, ya no deberemos temer a las clasicas “Blue Screens of Death” o cuelgues de W32, ya que simplemente cerraremos la ventana virtual donde se encuentra corriendo y listo, es decir, el “cuelgue” de la maquina virtual no afectara a la operacion de la computadora en general.
Para los que no tienen mucha idea de lo que estoy hablando ( como yo mismo hace unos dias ) tratare de explicarlo de la manera mas simple posible. Les dire que estamos por hacer lo siguiente: Dentro de nuestro Linux, vamos a instalar Windows XP SP2, pero dentro de un programa emulador (vmware) de tal modo que la instalacion de Windows XP SP2 quedara contenida unicamente dentro del emulador, sin afectar en absoluto la instalacion de nuestro Linux. Dentro del emulador podremos ver el escritorio de Windows XP SP2 tanto en pantalla completa como en una pequeña ventana, y podemos abrir y cerrar el emulador todas las veces que queramos sin la necesidad de rebootear nuestro Linux. Es como si Windows XP SP2 booteara magicamente en una nueva ventana cada vez que abrimos el emulador (vmware). Ademas, dentro del escritorio virtualizado de Windows obtendremos resolucion de 1024×768 (en pantalla completa) y tambien sonido. Ademas, la performance obtenida con la virtualizacion del hardware a travez de vmware es muy buena, y es dificil notar la diferencia entre si estamos ante una instalacion “real” o una virtualizada. ¿ Parece magia, no ?
Nota: vmware no es tecnicamente un emulador, sino un sistema de virtualizacion de hardware, pero aqui prefiero usar la palabra “emulador” ya que la mayoria de los usuarios estan mas familiarizados con este concepto.
Investigando un poco, encontre que VMWare ha lanzado una version gratuita de su programa de virtualizacion.
Me dispuse a instalarlo, con el fin de instalar un Sistema Windows XP Professional en la maquina virtual.
Los interrogantes eran muchos:
Para la performance obtenida … ¿ valdra la pena la instalacion ? ¿ Sera posible instalar un sistema de video y sonido decente en la maquina virtual ? ¿ Sera muy compleja la instalacion ? ¿ Se podra ver el entorno GUI de la maquina virtual y tener sonido sin problemas ? ¿ Podre tener conectividad con internet en la maquina virtual ? ¿ Sera necesario recompilar el kernel o algo parecido ?
Espero aclarar estas y otras dudas en el transcurso de esta nota, solo adelanto aqui que todas las preguntas se me fueron aclarando de forma muy satisfactoria.
INSTALACION
Lo primero que se necesita es por supuesto tener correctamente configurado y corriendo un Sistema GNU/Linux Ubuntu 6.06 , con una direccion IP estatica. Por ejemplo, la direccion IP estatica de la maquina donde voy a instalar el vmware-server es 192.168.0.1
este dato puede averiguarse corriendo el comando “ifconfig”.
Si no entiendes muy bien esto de configurar la red, te recomiendo leer primero Guia Ubuntu Server sobre todo, la seccion de configuracion de la red.
Descargar VMware Server
El VMware server puede ser descargado gratuitamente desde el sitio web de VMware: http://www.vmware.com/download/server/
Para ejecutar el software VMware server, necesitas un numero serial gratuito, el cual lo puedes pedir haciendo click en el boton “Register now” en la pagina de descarga.
Para poner VMWare en Ubuntu, necesitamos descargar los siguientes paquetes desde la pagina de VMware:
VMware Server for Linux. The core application needed to run VMware Server and interact with it on the local machine. TAR Binary. Binary (.tar.gz)
VMware-server-1.0.X-XXXXX.tar.gz
Management Interface. The VMware Server Web-based management interface. Install on your VMware Server system to enable control from a Web browser. Includes downloadable VMware Server Console installation files.
VMware-mui-1.0.X-XXXXX.tar.gz
VMware Server Linux client package. A zip package containing installer files for the following VMware Server Linux Client components: – Linux VMware Server Console (.tar and .rpm) – Perl scripting API for Linux (.tar) – Programming API (.tar)
VMware-server-linux-client-1.0.X-XXXXX.zip
ATENCION: Antes de instalar VMware-server, asegurate de que tienes instalado xinet, ya que de lo contrario, deberas instalarlo posteriormente y luego deberas reconfigurar todo de nuevo. VMware-server para funcionar correctamente depende de xinet.
aptitude install xinetd
Tambien, para proveer sonido a las maquinas virtuales, VMware-server utiliza el sistema de sonido OSS ( Open Sound System ). Si tienes configurado el sistema de sonido ALSA ( lo mas probable ) deberas instalar una libreria que sirve de interfaz para que los programas que usan OSS puedan utilizar ALSA.
aptitude install libaoss
Tanto en el caso de xinetd como en el de libaoss los puedes instalar sin miedo, pues no desconfiguraran nada de lo que tienes instalado.
INSTALACION DE VMware-server
wget [URL del archivo que sera descargado]
Desenpaquetando el server tar.gz:
tar xvfz VMware-server-*.tar.gz
Ejecutando el script instalador:
cd vmware-server-distrib ./vmware-install.pl
Creating a new installer database using the tar3 format.
Installing the content of the package.
In which directory do you want to install the binary files? [/usr/bin] /usr/local/bin
What is the directory that contains the init directories (rc0.d/ to rc6.d/)? [/etc]
What is the directory that contains the init scripts? [/etc/init.d]
In which directory do you want to install the daemon files? [/usr/local/sbin]
In which directory do you want to install the library files? [/usr/local/lib/vmware]
The path “/usr/local/lib/vmware” does not exist currently. This program is going to create it, including needed parent directories. Is this what you want? [yes]
In which directory do you want to install the manual files? [/usr/local/share/man]
The path “/usr/local/lib/vmware” does not exist currently. This program is going to create it, including needed parent directories. Is this what you want? [yes]
In which directory do you want to install the manual files? [/usr/local/share/man]
In which directory do you want to install the documentation files? [/usr/local/doc/vmware]
The path “/usr/local/doc/vmware” does not exist currently. This program is going to create it, including needed parent directories. Is this what you want? [yes]
The installation of VMware Server 1.0.4 build-56528 for Linux completed successfully. You can decide to remove this software from your system at any time by invoking the following command: “/usr/local/bin/vmware-uninstall.pl”.
Before running VMware Server for the first time, you need to configure it by invoking the following command: “/usr/local/bin/vmware-config.pl”. Do you want this program to invoke the command for you now? [yes]
Trying to find a suitable vmmon module for your running kernel.
None of the pre-built vmmon modules for VMware Server is suitable for your running kernel. Do you want this program to try to build the vmmon module for your system (you need to have a C compiler installed on your system)? [yes]
Trying to find a suitable vmmon module for your running kernel.
None of the pre-built vmmon modules for VMware Server is suitable for your running kernel. Do you want this program to try to build the vmmon module for your system (you need to have a C compiler installed on your system)? [yes]
Using compiler “/usr/bin/gcc”. Use environment variable CC to override.
What is the location of the directory of C header files that match your running kernel? [/lib/modules/2.6.15-26-386/build/include]
Extracting the sources of the vmmon module.
Building the vmmon module.
Using 2.6.x kernel build system. make: se ingresa al directorio `/tmp/vmware-config0/vmmon-only’ make -C /lib/modules/2.6.15-26-386/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules make1: se ingresa al directorio `/usr/src/linux-headers-2.6.15-26-386′ CC [M] /tmp/vmware-config0/vmmon-only/linux/driver.o CC [M] /tmp/vmware-config0/vmmon-only/linux/hostif.o CC [M] /tmp/vmware-config0/vmmon-only/common/cpuid.o CC [M] /tmp/vmware-config0/vmmon-only/common/hash.o CC [M] /tmp/vmware-config0/vmmon-only/common/memtrack.o CC [M] /tmp/vmware-config0/vmmon-only/common/phystrack.o CC [M] /tmp/vmware-config0/vmmon-only/common/task.o CC [M] /tmp/vmware-config0/vmmon-only/common/vmx86.o CC [M] /tmp/vmware-config0/vmmon-only/vmcore/moduleloop.o LD [M] /tmp/vmware-config0/vmmon-only/vmmon.o Building modules, stage 2. MODPOST CC /tmp/vmware-config0/vmmon-only/vmmon.mod.o LD [M] /tmp/vmware-config0/vmmon-only/vmmon.ko make1: se sale del directorio `/usr/src/linux-headers-2.6.15-26-386′ cp -f vmmon.ko ./../vmmon.o make: se sale del directorio `/tmp/vmware-config0/vmmon-only’ The module loads perfectly in the running kernel.
Do you want networking for your virtual machines? (yes/no/help) [yes]
Do you want networking for your virtual machines? (yes/no/help) [yes]
Configuring a bridged network for vmnet0.
Your computer has multiple ethernet network interfaces available: eth0, nas0. Which one do you want to bridge to vmnet0? [eth0]
The following bridged networks have been defined:
. vmnet0 is bridged to eth0
Do you wish to configure another bridged network? (yes/no) [no]
Do you want to be able to use NAT networking in your virtual machines? (yes/no) [yes]
Configuring a NAT network for vmnet8.
Do you want this program to probe for an unused private subnet? (yes/no/help) [yes]
Probing for an unused private subnet (this can take some time)…
The subnet 172.16.185.0/255.255.255.0 appears to be unused.
The following NAT networks have been defined:
. vmnet8 is a NAT network on private subnet 172.16.185.0.
Do you wish to configure another NAT network? (yes/no) [no]
Do you wish to configure another NAT network? (yes/no) [no]
Do you want to be able to use host-only networking in your virtual machines? [yes]
Configuring a host-only network for vmnet1.
Do you want this program to probe for an unused private subnet? (yes/no/help) [yes]
Probing for an unused private subnet (this can take some time)…
The subnet 172.16.198.0/255.255.255.0 appears to be unused.
The following host-only networks have been defined:
. vmnet1 is a host-only network on private subnet 172.16.198.0.
Do you wish to configure another host-only network? (yes/no) [no]
Do you wish to configure another host-only network? (yes/no) [no]
Extracting the sources of the vmnet module.
Building the vmnet module.
Using 2.6.x kernel build system. make: se ingresa al directorio `/tmp/vmware-config0/vmnet-only’ make -C /lib/modules/2.6.15-26-386/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules make1: se ingresa al directorio `/usr/src/linux-headers-2.6.15-26-386′ CC [M] /tmp/vmware-config0/vmnet-only/driver.o CC [M] /tmp/vmware-config0/vmnet-only/hub.o CC [M] /tmp/vmware-config0/vmnet-only/userif.o CC [M] /tmp/vmware-config0/vmnet-only/netif.o CC [M] /tmp/vmware-config0/vmnet-only/bridge.o CC [M] /tmp/vmware-config0/vmnet-only/procfs.o CC [M] /tmp/vmware-config0/vmnet-only/smac_compat.o SHIPPED /tmp/vmware-config0/vmnet-only/smac_linux.x386.o LD [M] /tmp/vmware-config0/vmnet-only/vmnet.o Building modules, stage 2. MODPOST Warning: could not find /tmp/vmware-config0/vmnet-only/.smac_linux.x386.o.cmd for /tmp/vmware-config0/vmnet-only/smac_linux.x386.o CC /tmp/vmware-config0/vmnet-only/vmnet.mod.o LD [M] /tmp/vmware-config0/vmnet-only/vmnet.ko make1: se sale del directorio `/usr/src/linux-headers-2.6.15-26-386′ cp -f vmnet.ko ./../vmnet.o make: se sale del directorio `/tmp/vmware-config0/vmnet-only’ The module loads perfectly in the running kernel.
Please specify a port for remote console connections to use [902]
Please specify a port for remote console connections to use [902]
inetd: no process killed Unable to make the Internet super-server (inetd) re-read its configuration file. Please restart inetd by hand: killall -v -HUP inetd
Hit enter to continue.
Configuring the VMware VmPerl Scripting API.
Building the VMware VmPerl Scripting API.
Using compiler “/usr/bin/gcc”. Use environment variable CC to override.
In which directory do you want to keep your virtual machine files? [/var/lib/vmware/Virtual Machines] The path “/var/lib/vmware/Virtual Machines” does not exist currently. This program is going to create it, including needed parent directories. Is this what you want? [yes] no
In which directory do you want to keep your virtual machine files? [/var/lib/vmware/Virtual Machines] /var/vm
Please enter your 20-character serial number.
Type XXXXX-XXXXX-XXXXX-XXXXX or ‘Enter’ to cancel: [La password que nos dieron al registrarnos en el sitio.]
Starting VMware services: Virtual machine monitor done Virtual ethernet done Bridged networking on /dev/vmnet0 done Host-only networking on /dev/vmnet1 (background) done Host-only networking on /dev/vmnet8 (background) done NAT service on /dev/vmnet8 done
The configuration of VMware Server 1.0.4 build-56528 for Linux for this running kernel completed successfully.
INSTALACION de la consola vmware
# cd vmware-server-console-distrib/ # ./vmware-install.pl
Creating a new installer database using the tar3 format.
Installing the content of the package.
In which directory do you want to install the binary files? [/usr/bin] /usr/local/bin
In which directory do you want to install the library files? [/usr/local/lib/vmware-server-console]
The path “/usr/local/lib/vmware-server-console” does not exist currently. This program is going to create it, including needed parent directories. Is this what you want? [yes]
In which directory do you want to install the manual files? [/usr/local/share/man]
In which directory do you want to install the documentation files? [/usr/local/share/doc/vmware-server-console]
The path “/usr/local/share/doc/vmware-server-console” does not exist currently. This program is going to create it, including needed parent directories. Is
Before running VMware Server Console for the first time, you need to configure it by invoking the following command: “/usr/local/bin/vmware-config-server-console.pl”. Do you want this program to invoke the command for you now? [yes]
INSTALACION DE LA INTERFAZ VMware MUI
tar xvfz VMware-mui-*.tar.gz cd vmware-mui-distrib ./vmware-install.pl
Setup is unable to find the “vmware” program on your machine. Please make sure it is installed. Do you want to specify the location of this program by hand? [yes]
What is the location of the “vmware” program on your machine? /usr/local/bin/vmware
In which directory do you want to install the binary files? [/usr/bin] /usr/local/bin
What is the directory that contains the init directories (rc0.d/ to rc6.d/)? [/etc]
What is the directory that contains the init scripts? [/etc/init.d]
In which directory do you want to install the VMware Management Interface files? [/usr/local/lib/vmware-mui]
The path “/usr/local/lib/vmware-mui” does not exist currently. This program is going to create it, including needed parent directories. Is this what you want? [yes]
In which directory would you like to install the documentation files? [/usr/local/lib/vmware-mui/doc]
The path “/usr/local/lib/vmware-mui/doc” does not exist currently. This program is going to create it, including needed parent directories. Is this what you want? [yes]
The installation of VMware Management Interface 1.0.4 build-56528 for Linux completed successfully. You can decide to remove this software from your system at any time by invoking the following command: “/usr/local/bin/vmware-uninstall-mui.pl”.
Before running VMware Management Interface for the first time, you need to configure it by invoking the following command: “/usr/local/bin/vmware-config-mui.pl”. Do you want this program to invoke the command for you now? [yes]
Setup is unable to find the “vmware” program on your machine. Please make sure it is installed. Do you want to specify the location of this program by hand? [yes]
What is the location of the “vmware” program on your machine? /usr/local/bin/vmware
Configuring httpd.conf to run Apache as: User: www-data and Group: nogroup
Set the number of minutes before a http session times out. (This is the length of time before someone connecting to VMware Management Interface will be logged out) [60] 30
Generating SSL Server Certificate
Starting httpd.vmware: done The configuration of VMware Management Interface completed successfully.
root@seba-desktop:/home/seba/vmware-mui-distrib#
Crear una maquina virtual
Usamos la interfaz grafica vmware-server-console para crear una nueva maquina virtual.
Nos logueamos a la direccion IP o host del servidor donde instalamos el vmware-server, con el usuario root y password.
Clickeamos en “New Virtual Machine” y seguimos el “whizard”. La aplicacion nos pregunta:
- Sistema Operativo (Linux, Windows, Novell Netware, Solaris or otro sistema operativo)
- Version del Sistema Operativo
- Ubicacion nombre de la maquina virtual. La carpeta /var/vm que hemos creado en el setup se encuentra preseleccionada.
- Red: Si quieres que la maquina virtual sea parte de la misma red que el mismo servidor, selecciona “bridget network”. Si quieres usar una “virtual NAT”, selecciona “Network address translation”.
- Ingresa el tamaño de tu disco virtual. Recomiendo deshabilitar la opcion que crea el disco virtual en tamaño completo instantaneamente, el disco entonces crecera con los datos que se vayan guardando hasta el maximo seleccionado.
Despues de que hayas finalizado con la creacion de la maquina virtual, inserta el CD del sistema operativo que quieres instalar en el CD / DVD del servidor, y presiona el boto “start the VM” ( iniciar la maquina virtual ).
Todas las marcas registradas pertenecen a sus respectivos dueños.
Este articulo esta basado en http://www.howtoforge.com/ubuntu_vmware_server
PROBLEMA NO PUEDO CONECTAR A VMWARE usando una consola remota
solucion via: http://ubuntuforums.org
Sintomas: no se puede conectar con la consola remota al servidor. Solo se puede conectar con la opcion de localhost. Ni siquiera se puede hacer un telnet al puerto 902. Symtpons: unable to connect to remote console with anything other than a localhost with the actual console. No telnet localhost 902 even
Solucion: Vmware server console (vm-authd) depende de xinetd. xinetd no esta instalado por default en Ubuntu. Solution: I know this is noob but I am noob to ubuntu. Vmware server console(vm-authd) depends on xinetd. xinetd is not installed by default in Ubuntu
- Open synaptic or use apt-get to download xinetd
- confirmed xinet running with ps waux
- re-run vmware-config.pl should ask to rerun vm mui config also if you have it
- re-ran vmware-config-server-console
- telnet localhost 902 , confirmed
- connected with server console from another host
Mejorar el video de la maquina virtual
He comprobado que es beneficioso instalar vmware tools, que se instala desde las opciones del menu de la maquina virtual que se encuentra corriendo. Esto instala herramientas adicionales que configuran la placa de video de la maquina virtual para que soporte la resolucion optima.
PROBLEMA DE SONIDO
Resulta que vmware utiliza el sistema de sonido OSS. La mayoria de las instalaciones nuevas de Linux vienen por default con ALSA Por lo cual, si no tienes instalado OSS es probable que no funcione el sonido de la maquina virtual.
Pero encontre una Solucion via http://ubuntuforums.org/
que lo que hace es usar la libreria libaoss, como un wrapper para que vmware puede trabajar directamente con ALSA.
La siguiente solucion me funciono muy bien.
Concise practical summary / steps for the impatient (tested on VMware version 5.5.3 build-34685): Note: to run step #2 successfully you will need apt’s Universal (Community maintained) repository enabled.
- sudo -i
- aptitude install alsa-oss
- chmod +s /usr/lib/libaoss.so.*
- mv /usr/bin/vmware /usr/bin/vmware.orig
- echo ‘#!/bin/bash’ > /usr/bin/vmware
- echo ‘LD_PRELOAD=libaoss.so exec /usr/bin/vmware.orig “$@”‘ » /usr/bin/vmware
- chmod +x /usr/bin/vmware
- exit
(now launch vmware as before)
Background:
The sound on your Ubuntu system works perfectly.
When you start a Windows 2000/XP VM on VMWare, the sound works there too – most of the time… Every once in a while, despite the sound device not being used at all by any Linux program (or so you think), you get the following error message when starting a Windows 2000/XP VM on VMWare:
Quote: Failed to open sound device /dev/dsp: Device or resource busy Virtual device sound will start disconnected. Explanation:
- Your Ubuntu system is using ALSA for sound mixing. ALSA is the Advanced Linux Sound Architecture.
- VMWare, on the other hand, is using OSS. OSS is the free version of the Open Sound System.
There are two ways of getting an application to work with ALSA if the application was written for OSS.
- The first way is to load the special ALSA drivers that emulate the OSS kernel interface; these allow the application to open /dev/dsp0 and other OSS device files.
- The second way is to wrap the application in the libaoss library provided in this package; the wrapper causes the application to access native ALSA device files such as /dev/snd/pcmC0D0c instead of OSS device files.
Use of the alsa-oss library (i.e. method 2) is recommended over the use of OSS-emulation drivers if you want to use ALSA’s PCM plugin layer.
Enjoy!
Me gustaria saber sus experiencias / problemas con respecto a este tema. Si queres participar o dejar una pregunta, por favor escribe un comentario.