Hoje um dos maiores problemas quanto a virtualizações é que quando ela é necessária, há muitas dúvidas em como usar e o que usar.
Nesse artigo trago uma das soluções mais conhecidas no mundo todo, que uso e recomendo para servidores virtuais, o
VMWare Server.
O aplicativo é simples, funcional e traz uma customização muito fácil para aqueles que precisam gerenciá-lo.
O servidor não precisa ter ambiente gráfico e nada de pacotes indesejáveis. Faça a instalação mais crua possível, pois o que nos interessa é conseguir usar o máximo do servidor para as máquinas virtuais.
Então mãos na massa!
Download e instalação
O VMWare Server é uma ferramenta gratuita e pode ser baixado no site:
Nessa mesma página há um link onde pode ser feito um cadastro para obter a chave de instalação do mesmo.
Precisamos instalar alguns pacotes para não termos dor de cabeça na hora da instalação.
# apt-get update
# apt-get install linux-headers-`uname -r` libx11-6 libx11-dev x-window-system-core x-window-system xspecs libxtst6 psmisc build-essential
Agora vamos começar a instalação do VMware Server.
Precisamos descompactar o arquivo baixado:
# tar zxfv Vmware-server-*.tar.gz
Entre na pasta descompactada:
# cd vmware-server-distrib
Comece a instalação:
# ./vmware-install.pl
A instalação fará algumas perguntas a você. Siga a instruções abaixo.
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/bin
What is the directory that contains the init directories (rc0.d/ to rc6.d/)?
[/etc] <--
/etc
What is the directory that contains the init scripts?
[/etc/init.d] <--
/etc/init.d
In which directory do you want to install the daemon files?
[/usr/sbin] <--
/usr/sbin
In which directory do you want to install the library files?
[/usr/lib/vmware] <--
/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] <--
yes
In which directory do you want to install the manual files?
[/usr/share/man] <--
/usr/share/man
In which directory do you want to install the documentation files?
[/usr/share/doc/vmware] <--
/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] <--
yes
The installation of VMware Server 1.0.2 build-39867 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] <--
yes
Making sure services for VMware Server are stopped.
Stopping VMware services:
Virtual machine monitor done
You must read and accept the End User License Agreement to continue.
Press enter to display it. <--
[ENTER]
..... snip [LICENCE TEXT] ......
Do you accept? (yes/no) <--
yes
Configuring fallback GTK+ 2.4 libraries.
In which directory do you want to install the mime type icons?
[/usr/share/icons] <--
/usr/share/icons
The path "/usr/share/icons" does not exist currently. This program is going to
create it, including needed parent directories. Is this what you want?
[yes] <--
yes
What directory contains your desktop menu entry files? These files have a
.desktop file extension. [/usr/share/applications] <--
/usr/share/applications
In which directory do you want to install the application's icon?
[/usr/share/pixmaps] <--
/usr/share/pixmaps
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] <--
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.18-4-486/build/include]<--
/lib/modules/2.6.8-2-386/build/include
[...]
Do you want networking for your virtual machines? (yes/no/help) [yes] <--
yes
Configuring a bridged network for vmnet0.
The following bridged networks have been defined:
. vmnet0 is bridged to eth0
Do you wish to configure another bridged network? (yes/no) [no] <--
no
Do you want to be able to use NAT networking in your virtual machines? (yes/no)
[yes] <--
yes
Configuring a NAT network for vmnet8.
Do you want this program to probe for an unused private subnet? (yes/no/help)
[yes] <--
yes
Probing for an unused private subnet (this can take some time)...
The subnet 172.16.191.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.191.0.
Do you wish to configure another NAT network? (yes/no) [no] <--
no
Do you want to be able to use host-only networking in your virtual machines?
[yes] <--
yes
Configuring a host-only network for vmnet1.
Do you want this program to probe for an unused private subnet? (yes/no/help)
[yes] <--
yes
Probing for an unused private subnet (this can take some time)...
The subnet 172.16.98.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.98.0.
Do you wish to configure another host-only network? (yes/no) [no] <--
no
[...]
Please specify a port for remote console connections to use [902] <--
902
Restarting internet superserver: inetd.
Configuring the VMware VmPerl Scripting API.
Building the VMware VmPerl Scripting API.
Using compiler "/usr/bin/gcc". Use environment variable CC to override.
Installing the VMware VmPerl Scripting API.
The installation of the VMware VmPerl Scripting API succeeded.
Generating SSL Server Certificate
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: <-- Coloque aqui o serial.
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.2 build-39867 for Linux for this running
kernel completed successfully.
A instalação do servidor está concluída.