Installazione di VMWare Server 2 su Debian Lenny
Premessa
VMWare Server 2 è il nuovo sistema di virtualizzazione rilasciato da VMware in licenza completamente gratuita. L’installazione è possibile sia su sistemi Windows sia Linux, con la possibilità di gestire ora l’intero sistema tramite interfaccia web. Vediamo i primi passi dell’installazione su una distribuzione Linux CentOS e le impostazioni di base per la creazione delle macchine virtuali.
VMware Server 2 è l’ultima versione gratuita di VMware per la gestione delle macchine virtuali su server medio-piccoli. In questo articolo vediamo come installare velocemente il software e passare da subito alla creazione delle nostre macchine virtuali.
Tra le maggiori novità attualmente presenti nella nuova versione va sicuramente citata la possibilità di gestire il sistema di virtualizzazione attraverso un’interfaccia web-based.
Ecco alcune nuove caratteristiche di VMware Server 2.0:
- Interfaccia di amministrazione web (VI Web Access).
- Nuova console per la gestione a distanza (VMware Remote Console) installabile come add-on per il proprio browser che funziona indipendentemente dall’interfaccia di amministrazione web.
- Pieno supporto alle periferiche che usano lo standard USB 2.0: webcam, altoparlanti, scanner e stampanti e dischi esterni.
- Aumento della quantità di RAM supportata per una singola macchina virtuale. Si possono assegnare a una virtual machine fino a 8 GB rispetto ai 3,6 attribuibili con la precedente versione di VMware Server.
- Miglioramento del supporto ai sistem operativi host e guest a 64 bit, che possono essere usati anche in modo nativo ottenendo ottime prestazioni.
- Possibilità di rimuovere e aggiungere hard disc SCSI durante il funzionamento della virtual machine.
Preparazione del sistema
Per poter installare VMware Server è necessario che sul nostro sistema siano presenti i compilatori e librerie necessari pre la compilazione dei moduli che si andranno ad aggiungere al nostro kernel di base.
apt-get install linux-headers-`uname -r` psmisc build-essential make gcc gcc-4.1
Fix per Debian Lenny
In caso di installazione su Debian Lenny con kernel 2.6.26, l’installer di VMWare, una volta lanciato, rileverà che il kernel di Lenny è stato compilato con le librerie gcc 4.1, mentre in una Lenny aggiornata le librerie in questione risultano innalzate alla versione 4.3, e si rifiuterà qundi di compilare i moduli necessari, uscendo dalla procedura di installazione. Per ovviare a questo problema è necessario impostare temporaneamente, gcc-4.1 al posto di gcc-4.3 come compilatore di default.
cd /usr/bin/ unlink gcc ln -s gcc-4.1 gcc
Installazione di VMware Server
Procediamo al download della versione per linux 32bit in formato tar.gz di VMware Server, quindi decomprimiamo l’archivio e facciamo parire lo script d’installazione.
tar zxvf vmware-server-xxxxx.tar.gz cd vmware-server-xxxxx ./vmware-install.pl
Una serie di domande ci consentiranno di portare a termine l’installazione. Le risposte di default vanno bene per completare correttamente l’installazione.
Installing VMware Server. In which directory do you want to install the binary files? [/usr/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/sbin] In which directory do you want to install the library files? [/usr/lib/vmware] The path "/usr/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/share/man] In which directory do you want to install the documentation files? [/usr/share/doc/vmware] The path "/usr/share/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 2.0.2 build-203138 for Linux completed successfully. You can decide to remove this software from your system at any time by invoking the following command: "/usr/bin/vmware-uninstall.pl". Before running VMware Server for the first time, you need to configure it by invoking the following command: "/usr/bin/vmware-config.pl". Do you want this program to invoke the command for you now? [yes] Making sure services for VMware Server are stopped. Stopping VMware autostart virtual machines: Virtual machines failed Stopping VMware management services: VMware Virtual Infrastructure Web Access VMware Server Host Agent failed Stopping VMware services: VMware Authentication Daemon done Virtual machine monitor done You must read and accept the End User License Agreement to continue. Press enter to display it. Do you accept? (yes/no) yes Thank you. 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.26-2-686/build/include] Extracting the sources of the vmmon module. Building the vmmon module. Using 2.6.x kernel build system. make: Entering directory `/tmp/vmware-config0/vmmon-only' make -C /lib/modules/2.6.26-2-686/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules make[1]: Entering directory `/usr/src/linux-headers-2.6.26-2-686' CC [M] /tmp/vmware-config0/vmmon-only/linux/driver.o CC [M] /tmp/vmware-config0/vmmon-only/linux/driverLog.o CC [M] /tmp/vmware-config0/vmmon-only/linux/hostif.o CC [M] /tmp/vmware-config0/vmmon-only/common/comport.o CC [M] /tmp/vmware-config0/vmmon-only/common/cpuid.o CC [M] /tmp/vmware-config0/vmmon-only/common/hashFunc.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 1 modules CC /tmp/vmware-config0/vmmon-only/vmmon.mod.o LD [M] /tmp/vmware-config0/vmmon-only/vmmon.ko make[1]: Leaving directory `/usr/src/linux-headers-2.6.26-2-686' cp -f vmmon.ko ./../vmmon.o make: Leaving directory `/tmp/vmware-config0/vmmon-only' The vmmon module loads perfectly into the running kernel. None of the pre-built vmci modules for VMware Server is suitable for your running kernel. Do you want this program to try to build the vmci module for your system (you need to have a C compiler installed on your system)? [yes] Extracting the sources of the vmci module. Building the vmci module. Using 2.6.x kernel build system. make: Entering directory `/tmp/vmware-config0/vmci-only' make -C /lib/modules/2.6.26-2-686/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules make[1]: Entering directory `/usr/src/linux-headers-2.6.26-2-686' CC [M] /tmp/vmware-config0/vmci-only/linux/driver.o CC [M] /tmp/vmware-config0/vmci-only/linux/driverLog.o CC [M] /tmp/vmware-config0/vmci-only/linux/vmciKernelIf.o CC [M] /tmp/vmware-config0/vmci-only/common/vmciContext.o CC [M] /tmp/vmware-config0/vmci-only/common/vmciDatagram.o CC [M] /tmp/vmware-config0/vmci-only/common/vmciDriver.o CC [M] /tmp/vmware-config0/vmci-only/common/vmciDs.o CC [M] /tmp/vmware-config0/vmci-only/common/vmciEvent.o CC [M] /tmp/vmware-config0/vmci-only/common/vmciGroup.o CC [M] /tmp/vmware-config0/vmci-only/common/vmciHashtable.o CC [M] /tmp/vmware-config0/vmci-only/common/vmciProcess.o CC [M] /tmp/vmware-config0/vmci-only/common/vmciQueuePair.o CC [M] /tmp/vmware-config0/vmci-only/common/vmciResource.o LD [M] /tmp/vmware-config0/vmci-only/vmci.o Building modules, stage 2. MODPOST 1 modules CC /tmp/vmware-config0/vmci-only/vmci.mod.o LD [M] /tmp/vmware-config0/vmci-only/vmci.ko make[1]: Leaving directory `/usr/src/linux-headers-2.6.26-2-686' cp -f vmci.ko ./../vmci.o make: Leaving directory `/tmp/vmware-config0/vmci-only' The vmci module loads perfectly into the running kernel. None of the pre-built vsock modules for VMware Server is suitable for your running kernel. Do you want this program to try to build the vsock module for your system (you need to have a C compiler installed on your system)? [yes] Extracting the sources of the vsock module. Building the vsock module. Using 2.6.x kernel build system. make: Entering directory `/tmp/vmware-config0/vsock-only' make -C /lib/modules/2.6.26-2-686/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules make[1]: Entering directory `/usr/src/linux-headers-2.6.26-2-686' CC [M] /tmp/vmware-config0/vsock-only/linux/af_vsock.o CC [M] /tmp/vmware-config0/vsock-only/linux/driverLog.o CC [M] /tmp/vmware-config0/vsock-only/linux/util.o CC [M] /tmp/vmware-config0/vsock-only/linux/vsockAddr.o LD [M] /tmp/vmware-config0/vsock-only/vsock.o Building modules, stage 2. MODPOST 1 modules WARNING: "VMCIDatagram_CreateHnd" [/tmp/vmware-config0/vsock-only/vsock.ko] undefined! WARNING: "VMCIDatagram_DestroyHnd" [/tmp/vmware-config0/vsock-only/vsock.ko] undefined! WARNING: "VMCI_GetContextID" [/tmp/vmware-config0/vsock-only/vsock.ko] undefined! WARNING: "VMCIDatagram_Send" [/tmp/vmware-config0/vsock-only/vsock.ko] undefined! CC /tmp/vmware-config0/vsock-only/vsock.mod.o LD [M] /tmp/vmware-config0/vsock-only/vsock.ko make[1]: Leaving directory `/usr/src/linux-headers-2.6.26-2-686' cp -f vsock.ko ./../vsock.o make: Leaving directory `/tmp/vmware-config0/vsock-only' Unable to make a vsock module that can be loaded in the running kernel: insmod: error inserting '/tmp/vmware-config0/vsock.o': -1 Unknown symbol in module There is probably a slight difference in the kernel configuration between the set of C header files you specified and your running kernel. You may want to rebuild a kernel based on that directory, or specify another directory. The VM communication interface socket family is used in conjunction with the VM communication interface to provide a new communication path among guests and host. The rest of this software provided by VMware Server is designed to work independently of this feature. If you wish to have the VSOCK feature you can install the driver by running vmware-config.pl again after making sure that gcc, binutils, make and the kernel sources for your running kernel are installed on your machine. These packages are available on your distribution's installation CD. [ Press the Enter key to continue.] Do you want networking for your virtual machines? (yes/no/help) [yes] Configuring a bridged network for vmnet0. Please specify a name for this network. [Bridged] Your computer has multiple ethernet network interfaces available: eth0, eth1, eth2. Which one do you want to bridge to vmnet0? [eth0] eth1 The following bridged networks have been defined: . vmnet0 is bridged to eth1 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. Please specify a name for this network. [NAT] 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 192.168.114.0/255.255.255.0 appears to be unused. The following NAT networks have been defined: . vmnet8 is a NAT network on private subnet 192.168.114.0. 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. Please specify a name for this network. [HostOnly] 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 192.168.104.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 192.168.104.0. Do you wish to configure another host-only network? (yes/no) [no] None of the pre-built vmnet modules for VMware Server is suitable for your running kernel. Do you want this program to try to build the vmnet module for your system (you need to have a C compiler installed on your system)? [yes] Extracting the sources of the vmnet module. Building the vmnet module. Using 2.6.x kernel build system. make: Entering directory `/tmp/vmware-config1/vmnet-only' make -C /lib/modules/2.6.26-2-686/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules make[1]: Entering directory `/usr/src/linux-headers-2.6.26-2-686' CC [M] /tmp/vmware-config1/vmnet-only/driver.o CC [M] /tmp/vmware-config1/vmnet-only/hub.o CC [M] /tmp/vmware-config1/vmnet-only/userif.o CC [M] /tmp/vmware-config1/vmnet-only/netif.o CC [M] /tmp/vmware-config1/vmnet-only/bridge.o CC [M] /tmp/vmware-config1/vmnet-only/filter.o CC [M] /tmp/vmware-config1/vmnet-only/procfs.o CC [M] /tmp/vmware-config1/vmnet-only/smac_compat.o CC [M] /tmp/vmware-config1/vmnet-only/smac.o CC [M] /tmp/vmware-config1/vmnet-only/vnetEvent.o CC [M] /tmp/vmware-config1/vmnet-only/vnetUserListener.o LD [M] /tmp/vmware-config1/vmnet-only/vmnet.o Building modules, stage 2. MODPOST 1 modules CC /tmp/vmware-config1/vmnet-only/vmnet.mod.o LD [M] /tmp/vmware-config1/vmnet-only/vmnet.ko make[1]: Leaving directory `/usr/src/linux-headers-2.6.26-2-686' cp -f vmnet.ko ./../vmnet.o make: Leaving directory `/tmp/vmware-config1/vmnet-only' The vmnet module loads perfectly into the running kernel. Please specify a port for remote connections to use [902] Please specify a port for standard http connections to use [8222] Please specify a port for secure http (https) connections to use [8333] The current administrative user for VMware Server is ''. Would you like to specify a different administrator? [no] Using root as the VMware Server administrator. 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] Please enter your 20-character serial number. Type XXXXX-XXXXX-XXXXX-XXXXX or 'Enter' to cancel: ACDEF-12345-GHILM-67890 Creating a new VMware VIX API installer database using the tar4 format. Installing VMware VIX API. In which directory do you want to install the VMware VIX API binary files? [/usr/bin] In which directory do you want to install the VMware VIX API library files? [/usr/lib/vmware-vix/lib] The path "/usr/lib/vmware-vix/lib" 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 VMware VIX API document pages? [/usr/share/doc/vmware-vix] The path "/usr/share/doc/vmware-vix" 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 VIX API 1.6.2 build-203138 for Linux completed successfully. You can decide to remove this software from your system at any time by invoking the following command: "/usr/bin/vmware-uninstall-vix.pl". Enjoy, --the VMware team Starting VMware services: Virtual machine monitor done Virtual machine communication interface done Virtual ethernet done Bridged networking on /dev/vmnet0 done Host-only networking on /dev/vmnet1 (background) done DHCP server on /dev/vmnet1 done Host-only networking on /dev/vmnet8 (background) done DHCP server on /dev/vmnet8 done NAT service on /dev/vmnet8 done VMware Server Authentication Daemon (background) done Shared Memory Available done Starting VMware management services: VMware Server Host Agent (background) done VMware Virtual Infrastructure Web Access Starting VMware autostart virtual machines: Virtual machines done The configuration of VMware Server 2.0.2 build-203138 for Linux for this running kernel completed successfully.
Ripristino di gcc-4.3
Dato che abbiamo terminato l’installazione di VMWare Server, ora possiamo riportare alla normalità la situazione legata a gcc-4.3.
cd /usr/bin/ unlink gcc ln -s gcc-4.3 gcc
Accesso a VMWare Server 2
Avviare FireFox o Internet Explorer e inserire la password di root.

Ora si aprirà una pagina web (attenzione è richiesto il supporto di Javascript). Per creare una macchina virtuale basta seguire la procedura guidata.

Bisogna dare un nome alla macchina virtuale e indicare il datastore nel quale memorizzarla. Di default esiste un solo datastore che corrisponde alla partizione dove si è scelto di salvare le virtual machine.

Successivamente è opportuno indicare quale sistema operativo verrà ospitato. Nella sezione “Product Compatibility” si può scegliere se creare una macchina virtuale compatibile anche con altre versioni di VMware. vmware-server8
E’ utile modificare quest’impostazione se si vuole usare la VM su altri prodotti di virtualizzazione.

Nella parte “Memory and Processors” si devono inserire i valori riguardanti la memoria adoperata dalla virtual machine. Recomended Maximum è la quantità che viene adoperata in caso di bisogno ma se è vitale che la macchina non usi troppa memoria (magari se ci sono altre VM) è meglio abbassare il valore.

Naturalmente è necessario creare un disco virtuale e assegnargli una quantità ragionevole di spazio.

E’ possibile scegliere il tipo di rete: NAT, Bridged, Host-only.

Per procedere all’installazione di un sistema operativo è bene abilitare un’unità ottica oppure selezionare un’immagine ISO.

Con VMware Server 2 si può usare un floppy o un’immagine di un floppy per avviare sistemi operativi di vecchia data (DOS, Windows 3.1…) o particolari.

E’ anche possibile abilitare il controller USB per le virtual machine, così da poter usare webcam, pen drive…

Al termine della creazione guidata appare una voce tra le “Virtual Machines” per avviarla è sufficiente cliccare su “Power On” nel menù “Commands”.


Una volta avviata è possibile vedere lo schermo della macchina virtuale con la console remota cliccando sul tab “Console”.
Se è la prima volta che si usa VMware Remote Console è necessario installare un plug-in per il browser.

Per installarlo, usando Firefox, basta cliccare sul pulsante “Permetti ” che è comparso sotto la barra di ricerca del browser e autorizzare l’installazione.

Finalmente è possibile installare il sistema operativo desiderato sul guest.




Ciao, mi si è incantato il web management.
Se faccio un /etc/init.d/vmware restart , mi ferma e riavvia tutto
(a parte la stranezza che vedo anche nel tuo listato di sopra e cioè, alla riga dove avvia
VMware Virtual Infrastructure Web Access
non c’è scritto “done” alla fine della riga)
Comunque, se riavvio il server, collegandomi in http alla porta 8222 mi reindirizza all’errore del certificato, ma poi, accettato il certificato, non succede piu nulla. Resta li in eterno.
Riprovando con la 8222 non la trova piu. Sullo stesso server, la stessa eth0 è normalmente raggiungibile webmin funziona, ssh funziona etc etc. E’ proprio il web management che non va piu.
Ho provato a far rigirare lo script vmware-config.pl ma non cambia nulla.
Nessuna idea?
Grazie
Robert