Instalar e configurar VMware Tools no Slackware

Este é um guia do usuário sobre como instalar as ferramentas da VMware para Slackware Linux em host Windows XP. O host Windows XP está funcionando VMware Workstation e do sistema operacional convidado é Slackware 12.1.

 

No host Windows XP

 

No host Windows XP, montar imagem iso Linux  cd/dvd do vmware. Imagem iso do Linux está em
C:\Program Files\VMware\VMware Workstation. O nome da imagem é linux.iso.

 

To install vmware tools, user must first completed the guest operating system installation. The vmware program will remind you during guest operating system boot up. So, you can only install vmware tools for guest operating system after boot up is finished. Also, please check that binutils, gcc, make and kernel source already installed in your Linux. Check installed packages with pkgtool and make sure you installed all packages mentioned above before proceed. When everything is ready, start Slackware guest operating system.

 

Para instalar o vmware tools, o usuário deve primeiro concluir a instalação do sistema operacional convidado. O programa VMware irá lembrá-lo durante a inicialização do sistema operacional. Assim, você só pode instalar vmware tools após a inicialização for concluída. Além disso, verifique se binutils, gcc, make e kernel source está instalado no seu Linux. Confira os pacotes instalados com pkgtool e certifique-se que você instalou todos os pacotes mencionados acima antes de prosseguir. Quando tudo estiver pronto, iniciar o sistema operacional convidado Slackware.

 

No sistema operacional convidado Slackware

 

Logar como root quando pedir. Você não precisa estar no KDE para instalar o VMware Tools. Iremos instalar via linha de comando.

 

Monte a imagem linux.iso e execute os comandos abaixos:

 

[email protected]:~#  mount /dev/hdc /mnt/dvd/ 
mount: block device /dev/hdc is write-protected, mounting read-only
[email protected]:~#
     

 

Por favor, note que o seu cd / dvd unidade pode ser nome diferente. Verifique com dmesg | grep hd, se você está usando a unidade IDE. Alterar hd para sd se você estiver usando SCSI.

 

Mude para o diretório /mnt/dvd e copie o vmware tools para /tmp.

 

[email protected]:~#  cd /mnt/dvd/ 
[email protected]:/mnt/dvd#  ls 
VMwareTools-x.x.x-xxxxx.i386.rpm  VMwareTools-x.x.x-xxxxx.tar.gz
[email protected]:/mnt/dvd#  cp -r VMwareTools-x.x.x-xxxxx.tar.gz /tmp 
[email protected]:/mnt/dvd#
     

 

Vá para o diretório /tmp e desmonte o linux.iso.

 

[email protected]:/mnt/dvd#  cd /tmp 
[email protected]:/tmp#  umount /mnt/dvd/ 
     

 

Descompacte o pagate VMware Tools usando o comando.

 

[email protected]:/tmp#
[email protected]:/tmp#  tar zxvf VMwareTools-x.x.x-xxxxx.tar.gz 
     

 

Vá para o diretório vmware-tools-distrib e execute o script de instalação. Durante a instalação, você deve entrar com o diretório correto.

 

[email protected]:/tmp#  cd vmware-tools-distrib/ 
[email protected]:/tmp/vmware-tools-distrib#  ./vmware-install.pl 
Installing VMware Tools.
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/init.d]  /etc
What is the directory that contains the init scripts?
[/etc/rc.d/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-tools]  /usr/lib/vmware-tools
The path "/usr/lib/vmware-tools" 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 documentation files?
[/usr/share/doc/vmware-tools]  /usr/share/doc/vmware-tools
The path "/usr/share/doc/vmware-tools" 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 Tools x.x.x build-xxxxx 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-tools.pl".
Before running VMware Tools for the first time, you need to configure it by
invoking the following command: "/usr/bin/vmware-config-tools.pl". Do you want
this program to invoke the command for you now? [yes]  yes
Unable to create symlink "/etc/pam.d/vmware-guestd" pointing to file
"/usr/lib/vmware-tools/configurator/pam.d/vmware-guestd".
Execution aborted.
     

 

Opsss desculpe, eu esqueci disso. Configuração VMware Tools falhou porque não existe nenhum diretório pam.d no diretório / etc. Então criamos diretório pam.d com o comando mkdir e iniciar a configuração mais uma vez.

 

[email protected]:~#  mkdir /etc/pam.d 
[email protected]:~#  /usr/bin/vmware-config-tools.pl 
Stopping VMware Tools services in the virtual machine:
   Guest operating system daemon:                          [  OK  ]
   Blocking file system:                                   [  OK  ]
   Guest memory manager:                                   [  OK  ]
Trying to find a suitable vmmemctl module for your running kernel.
None of the pre-built vmmemctl modules for VMware Tools is suitable for your
running kernel.  Do you want this program to try to build the vmmemctl 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.24.5-smp/build/include]
Extracting the sources of the vmmemctl module.
Building the vmmemctl module.
Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config4/vmmemctl-only'
make -C /lib/modules/2.6.24.5-smp/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/linux-2.6.24.5'
  CC [M]  /tmp/vmware-config4/vmmemctl-only/os.o
  SHIPPED /tmp/vmware-config4/vmmemctl-only/vmmemctl1.o
  LD [M]  /tmp/vmware-config4/vmmemctl-only/vmmemctl.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /tmp/vmware-config4/vmmemctl-only/vmmemctl.mod.o
  LD [M]  /tmp/vmware-config4/vmmemctl-only/vmmemctl.ko
make[1]: Leaving directory `/usr/src/linux-2.6.24.5'
cp -f vmmemctl.ko ./../vmmemctl.o
make: Leaving directory `/tmp/vmware-config4/vmmemctl-only'
The module loads perfectly in the running kernel.
Trying to find a suitable vmhgfs module for your running kernel.
None of the pre-built vmhgfs modules for VMware Tools is suitable for your
running kernel.  Do you want this program to try to build the vmhgfs module for
your system (you need to have a C compiler installed on your system)? [yes]
Extracting the sources of the vmhgfs module.
Building the vmhgfs module.
Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config4/vmhgfs-only'
make -C /lib/modules/2.6.24.5-smp/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/linux-2.6.24.5'
  CC [M]  /tmp/vmware-config4/vmhgfs-only/backdoor.o
  CC [M]  /tmp/vmware-config4/vmhgfs-only/backdoorGcc32.o
  CC [M]  /tmp/vmware-config4/vmhgfs-only/bdhandler.o
  CC [M]  /tmp/vmware-config4/vmhgfs-only/cpName.o
In file included from include/linux/string.h:11,
                 from /tmp/vmware-config4/vmhgfs-only/cpName.h:18,
                 from /tmp/vmware-config4/vmhgfs-only/cpName.c:18:
include/linux/types.h:40: error: conflicting types for 'uintptr_t'
/tmp/vmware-config4/vmhgfs-only/vm_basic_types.h:170: 
error: previous declaration of 'uintptr_t' was here
make[2]: *** [/tmp/vmware-config4/vmhgfs-only/cpName.o] Error 1
make[1]: *** [_module_/tmp/vmware-config4/vmhgfs-only] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.24.5'
make: *** [vmhgfs.ko] Error 2
make: Leaving directory `/tmp/vmware-config4/vmhgfs-only'
Unable to build the vmhgfs module.
The filesystem driver (vmhgfs module) is used only for the shared folder
feature. The rest of the software provided by VMware Tools is designed to work
independently of this feature.
If you wish to have the shared folders feature, you can install the driver by
running vmware-config-tools.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 Enter key to continue ]
Can not find /etc/init.d/network and /etc/init.d/networking.
The fast network device driver (vmxnet module) is used only for our fast
networking interface. The rest of the software provided by VMware Tools is
designed to work independently of this feature.
If you wish to have the fast network driver enabled, you can install the driver
by running vmware-config-tools.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 Enter key to continue ]
Trying to find a suitable vmblock module for your running kernel.
None of the pre-built vmblock modules for VMware Tools is suitable for your
running kernel.  Do you want this program to try to build the vmblock module
for your system (you need to have a C compiler installed on your system)?
[yes]
Extracting the sources of the vmblock module.
Building the vmblock module.
Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config5/vmblock-only'
make -C /lib/modules/2.6.24.5-smp/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/linux-2.6.24.5'
  CC [M]  /tmp/vmware-config5/vmblock-only/linux/block.o
  CC [M]  /tmp/vmware-config5/vmblock-only/linux/control.o
  CC [M]  /tmp/vmware-config5/vmblock-only/linux/dbllnklst.o
  CC [M]  /tmp/vmware-config5/vmblock-only/linux/dentry.o
  CC [M]  /tmp/vmware-config5/vmblock-only/linux/file.o
  CC [M]  /tmp/vmware-config5/vmblock-only/linux/filesystem.o
  CC [M]  /tmp/vmware-config5/vmblock-only/linux/inode.o
  CC [M]  /tmp/vmware-config5/vmblock-only/linux/module.o
  CC [M]  /tmp/vmware-config5/vmblock-only/linux/stubs.o
  CC [M]  /tmp/vmware-config5/vmblock-only/linux/super.o
  LD [M]  /tmp/vmware-config5/vmblock-only/vmblock.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /tmp/vmware-config5/vmblock-only/vmblock.mod.o
  LD [M]  /tmp/vmware-config5/vmblock-only/vmblock.ko
make[1]: Leaving directory `/usr/src/linux-2.6.24.5'
cp -f vmblock.ko ./../vmblock.o
make: Leaving directory `/tmp/vmware-config5/vmblock-only'
The module loads perfectly in the running kernel.
[EXPERIMENTAL] The Virtual Machine Communication Interface (VMCI) service
provides a new communication capability with the Host, primarily for
development at the moment.  Would you like to enable this feature? [no]
Detected X.org version 0.0.0.
No drivers for X.org version: 0.0.0.
Do you want to change the display size that X starts with? (yes/no) [no]
Starting VMware Tools services in the virtual machine:
   Switching to guest configuration:                       [  OK  ]
   Guest memory manager:                                   [  OK  ]
   Blocking file system:                                   [  OK  ]
   DMA setup:                                              [  OK  ]
   Guest operating system daemon:                          [  OK  ]
The configuration of VMware Tools x.x.x build-xxxxx for Linux for this running
kernel completed successfully.
You must restart your X session before any mouse or graphics changes take
effect.
You can now run VMware Tools by invoking the following command:
"/usr/bin/vmware-toolbox" during an X server session.
To make use of the virtual printer, you will need to restart the CUPS service
Enjoy,
--the VMware team
[email protected]:~#  
     

 

Agora você pode iniciar a interface gráfica e abrir um terminal para executar o vmware tools: /usr/bin/vmware-toolbox. Você pode notar a diferença?

 

Fonte: http://www.basicconfig.com/software/vmware_tools_slackware

.