When commissioning a Suse 11 guest it may install a version of open-vm-tools which often performs its role adequately. However recently I found I have some live data store migration issues with guests that only had open-vm-tools.
Your version may be slightly different but for my guests, to uninstall open-vm-tools I needed to run
rpm -e vmware-open-vm-tools-kmod-8.0.4-480973.sles11sp1.x86_64 rpm -e vmware-open-vm-tools-common-8.0.4-480973.sles11sp1.x86_64
in order, ie kmod needed to be removed prior to common.
It was now onto installing the official VMware Tools – which isnt as easy as with Windows guests.
VMware Tools has gcc and the kernel headers as a prerequisite, so the first step is to connect the installation DVD (eg SLES-11-SP1-DVD-x86_64-GM-DVD1.iso) to the guest via the vSphere console.
Mount to your standard location, if you are not sure the below command will create a mount point and mount the DVD in one go;
mkdir /mnt/cdrom && mount /dev/cdrom /mnt/cdrom
From there you can run yast;
and select Software, then Software Management;
Tab down to the Search Phrase and enter ‘gcc’. The tab over to the right side, highlight it press [ENTER] – this will select it to be installed;
Tab back to the Search Phrase and enter ‘kernel’. Tab over to the right side and highlight kernel-default-devel and press [ENTER] – this will select it and some dependencies to be installed;
Tab back around the page until you get to Accept and hit [ENTER]. You will be presented with a confirmation box, when happy press [ENTER];
Yast will now go ahead and install gcc and the kernel headers, with should only take a minute or so;
Once it is complete you can next / ok your way out and close yast. If you want you can confirm the installations via;
rpm -q gcc rpm -q kernel-defaullt-dev
With prerequisites done its now onto VMware Tools. First unmount the installation DVD:
Via the vSphere console for that guest select VM, Install VMware Tools this will attach an ISO that has the installation files in it onto the the guest, but it wont mount it so enter;
mount /dev/cdrom /mnt/cdrom
There are two versions of the installation, and RPM package and a .tar.gz which needs to be compiled, which is the way I went. First, extract the .tar.gz into your temp folder via;
cp /mnt/cdrom/VMwareTools-*.tar.gz /tmp cd /tmp tar zxpf /mnt/cdrom/VMwareTools-*.tar.gz
After the extraction is complete, go to the created vmware-tools-distrib folder and run the installation script vmware-install.pl;
cd vmware-tools-distrib /vmware-install.pl
Now its pretty much follow the prompts;
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/init.d] 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 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 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".
VMware Tools is installed, now it needs to be compiled against your machine (hence the gcc and header prerequisites. The installation will offer to kick this off for you;
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] What is the location of the directory of C header files that match your running kernel? [/lib/modules/18.104.22.168-0.7-default/build/include]
Stuff will happen;
Building the vmmemctl module. Using 2.6.x kernel build system. make: Entering directory `/tmp/vmware-config0/vmmemctl-only' make -C /lib/modules/22.214.171.124-0.7-default/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \ MODULEBUILDDIR= modules make: Entering directory `/usr/src/linux-126.96.36.199-0.7-obj/x86_64/default' make -C ../../../linux-188.8.131.52-0.7 O=/usr/src/linux-184.108.40.206-0.7-obj/x86_64/default/. modules ... ...
and then it will ask
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]
There will be four of these for vmhgfs, vmxnet, vmblock and vmci – after confirming each there will be a blurb about the compiling process.
After vmci it prompts;
The communication service is used in addition to the standard communication between the guest and the host. The rest of the software provided by VMware Tools is designed to work independently of this feature. If you wish to have the VMCI 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 ]
After continuing you will be asked to confirm two more compiles for vmxnet3 then pvscsi, and then you pretty much done;
Creating a new initrd boot image for the kernel. Kernel image: /boot/vmlinuz-220.127.116.11-0.7-default Initrd image: /boot/initrd-18.104.22.168-0.7-default Root device: /dev/sda2 (mounted on / as ext3) Resume device: /dev/sda1 Kernel Modules: vmxnet hwmon thermal_sys thermal scsi_mod scsi_transport_spi mptbase mptscsih mptspi libata ata_piix ata_generic ide-core piix ide-pci-generic processor fan jbd mbcache ext3 edd crc-t10dif sd_mod Features: block resume.userspace resume.kernel Bootsplash: SLES (800x600) 28276 blocks No X install found. Checking acpi hot plug done Starting VMware Tools services in the virtual machine: Switching to guest configuration: done Paravirtual SCSI module: done Guest memory manager: done Guest operating system daemon: done The configuration of VMware Tools 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 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.
And that’s it – you’ve swapped out open-vm-tools for the official VMware Tools.