 |
 |
| VMware Tips: |
|
 |
 |

VMWARE MANAGEMENT, MIGRATION AND PERFORMANCE
Installing VMware Tools on Linux
Edward Haletky, Contributor 06.09.2009
Rating: --- (out of 5)




The Linux command-line interface can be unfamiliar territory for Windows administrators who now have a Linux machine in their virtual environment, making it difficult to install VMware Tools. VMware Communities always features a couple of posts on how to install VMware Tools in a Linux system. While there are several ways to do this, this how-to article explains how to install VMware Tools for CentOS and Red Hat Enterprise Linux (RHEL) version 5. The steps outlined below can also be used as a script to automatically update or install VMware Tools on Red Hat or CentOS Linux 5. (For those using version 3 or 4 of CentOS or Red Hat Linux, there are other methods available, which I will discuss in another tip.)
The definitive VMware Tools installation guide covers VMware OS-specific tools, which is the method we use here.
- Install your Red Hat or CentOS virtual machine (VM) using whichever mechanism works best for your environment. I use a Preboot eXecution Environment, or PXE, bootserver for such things.
- Configure the Red Hat or CentOS VM using your standard procedures.
Then, perform the following additional configuration steps:
- rpm --import http://packages.vmware.com/tools/VMWARE-PACKAGING-GPG-KEY.pub
- Use the following script to create a repository file useable by the yum command.
Note that you need to substitute <esx-version> with 3.5u2, 3.5u3, or 3.5u4. You also need to substitute <arch> with either i686 or x86_64 depending on whether your VM is a 32-or 64-bit VM, respectively.
To remove the tools, make the following commands:
- yum remove vmware-tools-* open-vm-tools-*
- yum -y install xorg-x11-drv-vmware xorg-x11-drv-vmmouse
- yum -y install vmware-tools open-vm-tools-xorg-drv-display open-vm-tools-xorg-drv-mouse
...
To continue reading for free, register below or login
To read more you must become a member of SearchVMware.com
');
// -->

Attempting this method with RHEL 5 Update 3 versions of VMware Tools, however, will result in failure to install VMware Tools as the GPG key is handled incorrectly. The only solution is to disable GPG checking. To do so, change the line within /etc/yum.repos.d/vmware-tools.repo from
to
Once completed, you can safely update and install VMware Tools without GPG errors.
Upgrading VMware Tools
It's easy to upgrade VMware Tools when you update your Red Hat distribution by using the following command:
If, however, your kernel is too new, you can't update from the VMware Tools OS-specific package repository and will have to build drivers locally. To do so, execute the following commands. Of importance: <esx-version> will be 3.5u2, 3.5u3 or 3.5u4. Also, you'll most likely want to run these commands on a development machine, as you need to install compilers and other build tools. The result will be a redistributable VMware Tools kernel module image that you can install in other VMs.
- yum list < /tmp/t
- vname=`grep vmware-tools /tmp/t|awk '{print $2}'`
- version=`basename $vname .el`
- wget http://packages.vmware.com/tools/esx/<esx-version>/rhel5/SRPMS/open-vm-tools-kmod-$version.src.rpm
- wget http://packages.vmware.com/tools/esx/<esx-version>/rhel5/SRPMS/vmware-tools-kmod-$version.src.rpm
- yum -y install yum-utils rpm-build
You may need to double-check the version of kernel-devel that is installed by the next command so that it matches your running kernel. In some cases, it will not be the latest version of the kernel.
- yum-builddep -y open-vm-tools-kmod-$version.src.rpm vmware-tools-kmod-$version.src.rpm
- rpmbuild --rebuild open-vm-tools-kmod-$version.src.rpm
- rpmbuild --rebuild vmware-tools-kmod-$version.src.rpm
- rpm -ivh /usr/src/redhat/RPMS/i386/open-vm-tools-kmod -`uname -r`-$version.i386.rpm /usr/src/redhat/RPMS/i386/vmware-tools-kmod-`uname -r`-$version.i386.rpm
[IMAGE] Edward L. Haletky is the author of VMware ESX Server in the Enterprise: Planning and Securing Virtualization Servers. He recently left Hewlett-Packard Co., where he worked on the virtualization, Linux and high-performance computing teams. Haletky owns AstroArch Consulting Inc. and is a champion and moderator for the VMware Communities Forums.
 |

|
|
 |
|
 |
 |
 |
 |
| TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of . |
|
| |
All Rights Reserved, , TechTarget |
|
|
|
|
|