Installing VMware Tools under Debian

From Thomas-Krenn-Wiki
Jump to: navigation, search
Please note that this article / this category refers either on older software / hardware components or is no longer maintained for other reasons.
This page is no longer updated and is purely for reference purposes still here in the archive available.

There have not been ready-made packages specific for the Debian operating system from VMware for VMware Tools until now, as they have existed for others such as Ubuntu.[1] Since open-vm-tools as supplied by Debian are not supported by VMware, VMware Tools must be manually installed under Debian to have a fully supported environment.

Installing VMware Tools

The installation routine can be called from the Install/Upgrade VMware Tools menu item in the vSphere client for the associated virtual machine. The following steps show how to install the necessary packages as well as start the installation manually, since this routine will not be started automatically in the virtual machine. In this example, the virtual machine is running with Debian 6 64-bit on an ESXi 5.0 host.

apt-get install gcc make linux-headers-2.6-amd64
mount /dev/cdrom /mnt
cp /mnt/VMwareTools-8.6.0-425873.tar.gz /root/
cd /root/
tar xzf VMwareTools-8.6.0-425873.tar.gz
cd vmware-tools-distrib/
./vmware-install.pl

Output

The following output shows the call made by the last installation command.

root@debian-6:~/vmware-tools-distrib# ./vmware-install.pl 
Creating a new VMware Tools installer database using the tar4 format.

Installing VMware Tools.

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-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] 

In which directory do you want to install the documentation files? 
[/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] 

The installation of VMware Tools 8.6.0 build-425873 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] 

Initializing...


Making sure services for VMware Tools are stopped.

Stopping VMware Tools services in the virtual machine:
   Guest operating system daemon:                                      done
   Unmounting HGFS shares:                                             done
   Guest filesystem driver:                                            done


[EXPERIMENTAL] The VMware FileSystem Sync Driver (vmsync) is a new feature that
creates backups of virtual machines. Please refer to the VMware Knowledge Base 
for more details on this capability. Do you wish to enable this feature? 
[no] 


Before you can compile modules, you need to have the following installed... 

make
gcc
kernel headers of the running kernel


Searching for GCC...
Detected GCC binary at "/usr/bin/gcc-4.3".
The path "/usr/bin/gcc-4.3" appears to be a valid path to the gcc binary.
Would you like to change it? [no] 

Searching for a valid kernel header path...
Detected the kernel headers at "/lib/modules/2.6.32-5-amd64/build/include".
The path "/lib/modules/2.6.32-5-amd64/build/include" appears to be a valid path
to the 2.6.32-5-amd64 kernel headers.
Would you like to change it? [no] 

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-root/modules/vmci-only'
make -C /lib/modules/2.6.32-5-amd64/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
	  MODULEBUILDDIR= modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.32-5-amd64'
  CC [M]  /tmp/vmware-root/modules/vmci-only/vmciDatagram.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/vmci_drv.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/vmciEvent.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/vmciGuestDs.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/vmciGuestKernelIf.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/vmciKernelIf.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/vmciNotifications.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/vmciProcess.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/vmciQPair.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/vmciQueuePair.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/vmciUtil.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/kernelStubsLinux.o
  LD [M]  /tmp/vmware-root/modules/vmci-only/vmci.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /tmp/vmware-root/modules/vmci-only/vmci.mod.o
  LD [M]  /tmp/vmware-root/modules/vmci-only/vmci.ko
make[1]: Leaving directory `/usr/src/linux-headers-2.6.32-5-amd64'
make -C $PWD SRCROOT=$PWD/. \
	  MODULEBUILDDIR= postbuild
make[1]: Entering directory `/tmp/vmware-root/modules/vmci-only'
make[1]: `postbuild' is up to date.
make[1]: Leaving directory `/tmp/vmware-root/modules/vmci-only'
cp -f vmci.ko ./../vmci.o
make: Leaving directory `/tmp/vmware-root/modules/vmci-only'

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-root/modules/vmci-only'
make -C /lib/modules/2.6.32-5-amd64/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
	  MODULEBUILDDIR= modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.32-5-amd64'
  CC [M]  /tmp/vmware-root/modules/vmci-only/vmciDatagram.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/vmci_drv.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/vmciEvent.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/vmciGuestDs.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/vmciGuestKernelIf.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/vmciKernelIf.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/vmciNotifications.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/vmciProcess.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/vmciQPair.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/vmciQueuePair.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/vmciUtil.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/kernelStubsLinux.o
  LD [M]  /tmp/vmware-root/modules/vmci-only/vmci.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /tmp/vmware-root/modules/vmci-only/vmci.mod.o
  LD [M]  /tmp/vmware-root/modules/vmci-only/vmci.ko
make[1]: Leaving directory `/usr/src/linux-headers-2.6.32-5-amd64'
make -C $PWD SRCROOT=$PWD/. \
	  MODULEBUILDDIR= postbuild
make[1]: Entering directory `/tmp/vmware-root/modules/vmci-only'
make[1]: `postbuild' is up to date.
make[1]: Leaving directory `/tmp/vmware-root/modules/vmci-only'
cp -f vmci.ko ./../vmci.o
make: Leaving directory `/tmp/vmware-root/modules/vmci-only'
Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-root/modules/vsock-only'
make -C /lib/modules/2.6.32-5-amd64/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
	  MODULEBUILDDIR= modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.32-5-amd64'
  CC [M]  /tmp/vmware-root/modules/vsock-only/linux/af_vsock.o
  CC [M]  /tmp/vmware-root/modules/vsock-only/linux/notify.o
  CC [M]  /tmp/vmware-root/modules/vsock-only/linux/notifyQState.o
  CC [M]  /tmp/vmware-root/modules/vsock-only/linux/stats.o
  CC [M]  /tmp/vmware-root/modules/vsock-only/linux/util.o
  CC [M]  /tmp/vmware-root/modules/vsock-only/linux/vsockAddr.o
  CC [M]  /tmp/vmware-root/modules/vsock-only/driverLog.o
  LD [M]  /tmp/vmware-root/modules/vsock-only/vsock.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /tmp/vmware-root/modules/vsock-only/vsock.mod.o
  LD [M]  /tmp/vmware-root/modules/vsock-only/vsock.ko
make[1]: Leaving directory `/usr/src/linux-headers-2.6.32-5-amd64'
make -C $PWD SRCROOT=$PWD/. \
	  MODULEBUILDDIR= postbuild
make[1]: Entering directory `/tmp/vmware-root/modules/vsock-only'
make[1]: `postbuild' is up to date.
make[1]: Leaving directory `/tmp/vmware-root/modules/vsock-only'
cp -f vsock.ko ./../vsock.o
make: Leaving directory `/tmp/vmware-root/modules/vsock-only'

The module vmxnet3 has already been installed on this system by another 
installer or package and will not be modified by this installer.  Use the flag 
--clobber-kernel-modules=vmxnet3 to override.

The module pvscsi has already been installed on this system by another 
installer or package and will not be modified by this installer.  Use the flag 
--clobber-kernel-modules=pvscsi to override.

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-root/modules/vmmemctl-only'
make -C /lib/modules/2.6.32-5-amd64/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
	  MODULEBUILDDIR= modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.32-5-amd64'
  CC [M]  /tmp/vmware-root/modules/vmmemctl-only/backdoorGcc64.o
  CC [M]  /tmp/vmware-root/modules/vmmemctl-only/os.o
  CC [M]  /tmp/vmware-root/modules/vmmemctl-only/vmballoon.o
  LD [M]  /tmp/vmware-root/modules/vmmemctl-only/vmmemctl.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /tmp/vmware-root/modules/vmmemctl-only/vmmemctl.mod.o
  LD [M]  /tmp/vmware-root/modules/vmmemctl-only/vmmemctl.ko
make[1]: Leaving directory `/usr/src/linux-headers-2.6.32-5-amd64'
make -C $PWD SRCROOT=$PWD/. \
	  MODULEBUILDDIR= postbuild
make[1]: Entering directory `/tmp/vmware-root/modules/vmmemctl-only'
make[1]: `postbuild' is up to date.
make[1]: Leaving directory `/tmp/vmware-root/modules/vmmemctl-only'
cp -f vmmemctl.ko ./../vmmemctl.o
make: Leaving directory `/tmp/vmware-root/modules/vmmemctl-only'

The VMware Host-Guest Filesystem allows for shared folders between the host OS 
and the guest OS in a Fusion or Workstation virtual environment.  Do you wish 
to enable this feature? [no] 

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-root/modules/vmxnet-only'
make -C /lib/modules/2.6.32-5-amd64/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
	  MODULEBUILDDIR= modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.32-5-amd64'
  CC [M]  /tmp/vmware-root/modules/vmxnet-only/vmxnet.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /tmp/vmware-root/modules/vmxnet-only/vmxnet.mod.o
  LD [M]  /tmp/vmware-root/modules/vmxnet-only/vmxnet.ko
make[1]: Leaving directory `/usr/src/linux-headers-2.6.32-5-amd64'
make -C $PWD SRCROOT=$PWD/. \
	  MODULEBUILDDIR= postbuild
make[1]: Entering directory `/tmp/vmware-root/modules/vmxnet-only'
make[1]: `postbuild' is up to date.
make[1]: Leaving directory `/tmp/vmware-root/modules/vmxnet-only'
cp -f vmxnet.ko ./../vmxnet.o
make: Leaving directory `/tmp/vmware-root/modules/vmxnet-only'

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-root/modules/vmblock-only'
make -C /lib/modules/2.6.32-5-amd64/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
	  MODULEBUILDDIR= modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.32-5-amd64'
  CC [M]  /tmp/vmware-root/modules/vmblock-only/linux/block.o
  CC [M]  /tmp/vmware-root/modules/vmblock-only/linux/control.o
  CC [M]  /tmp/vmware-root/modules/vmblock-only/linux/dbllnklst.o
  CC [M]  /tmp/vmware-root/modules/vmblock-only/linux/dentry.o
  CC [M]  /tmp/vmware-root/modules/vmblock-only/linux/file.o
  CC [M]  /tmp/vmware-root/modules/vmblock-only/linux/filesystem.o
  CC [M]  /tmp/vmware-root/modules/vmblock-only/linux/inode.o
  CC [M]  /tmp/vmware-root/modules/vmblock-only/linux/module.o
  CC [M]  /tmp/vmware-root/modules/vmblock-only/linux/stubs.o
  CC [M]  /tmp/vmware-root/modules/vmblock-only/linux/super.o
  LD [M]  /tmp/vmware-root/modules/vmblock-only/vmblock.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /tmp/vmware-root/modules/vmblock-only/vmblock.mod.o
  LD [M]  /tmp/vmware-root/modules/vmblock-only/vmblock.ko
make[1]: Leaving directory `/usr/src/linux-headers-2.6.32-5-amd64'
make -C $PWD SRCROOT=$PWD/. \
	  MODULEBUILDDIR= postbuild
make[1]: Entering directory `/tmp/vmware-root/modules/vmblock-only'
make[1]: `postbuild' is up to date.
make[1]: Leaving directory `/tmp/vmware-root/modules/vmblock-only'
cp -f vmblock.ko ./../vmblock.o
make: Leaving directory `/tmp/vmware-root/modules/vmblock-only'

No X install found.

Creating a new initrd boot image for the kernel.
update-initramfs: Generating /boot/initrd.img-2.6.32-5-amd64
   Checking acpi hot plug                                              done
Starting VMware Tools services in the virtual machine:
   Switching to guest configuration:                                   done
   Guest memory manager:                                               done
   VM communication interface:                                         done
   VM communication interface socket family:                           done
   File system sync driver:                                            done
   Guest operating system daemon:                                      done
The configuration of VMware Tools 8.6.0 build-425873 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 "/usr/bin/vmware-toolbox-cmd" from the
command line or by invoking "/usr/bin/vmware-toolbox" from the command line 
during an X server session.

To enable advanced X features (e.g., guest resolution fit, drag and drop, and 
file and text copy/paste), you will need to do one (or more) of the following:
1. Manually start /usr/bin/vmware-user
2. Log out and log back into your desktop session; and,
3. Restart your X session.

Enjoy,

--the VMware team

Found VMware Tools CDROM mounted at /mnt. Ejecting device /dev/sr0 ...
root@debian-6:~/vmware-tools-distrib# 

References

  1. VMware Operating System Specific Packages (OSPs) (vmware.com) Supported guest operating systems: Community ENTerprise Operating System (CentOS) 4.0 and higher, Red Hat Enterprise Linux 3.0 and higher, SUSE Linux Enterprise Server 9 and higher, SUSE Linux Enterprise Desktop 10 and higher, Ubuntu Linux 8.04 and higher


Foto Werner Fischer.jpg

Author: Werner Fischer

Werner Fischer, working in the Web Operations & Knowledge Transfer team at Thomas-Krenn, completed his studies of Computer and Media Security at FH Hagenberg in Austria. He is a regular speaker at many conferences like LinuxTag, OSMC, OSDC, LinuxCon, and author for various IT magazines. In his spare time he enjoys playing the piano and training for a good result at the annual Linz marathon relay.


Related articles

Icinga Graphs with PNP under Ubuntu 12.04 Precise
Simple Samba Shares in Debian
Two Default Gateways on One System