Install Open Source VMware Tools on Red Hat Enterprise/CentOS/Scientific Linux 6
VMware now makes a repository available for us to install the VMware tools for a variety of Linux distributions including Red Hat, Scientific, CentOS, and Ubuntu. In this example I will install VMware tools on a Red Hat Enterprise/CentOS/Scientific Linux 6 guest running on a VMware ESXi 4.1 host.
First import the VMware repository GPG signing public keys:
# rpm --import http://packages.vmware.com/tools/keys/VMWARE-PACKAGING-GPG-DSA-KEY.pub
# rpm --import http://packages.vmware.com/tools/keys/VMWARE-PACKAGING-GPG-RSA-KEY.pub
Now add the VMware repository. If you’d like you can use the “echo” command below or simply create the file and its contents are listed below it. There are other packages available in the repository for other Linux distros, architectures, and ESX host versions. Again I am using the Red Hat Enterprise 6/VMware ESXi 4.1 version.
# echo -e "[vmware-tools]\nname=VMware Tools\nbaseurl=http://packages.vmware.com\
/tools/esx/4.1latest/rhel6/\$basearch\nenabled=1\ngpgcheck=1" > /etc/yum.repos.d\
/vmware-tools.repo
Now we can list the contents of the new repo file:
[root@server1 ~]# cat /etc/yum.repos.d/vmware-tools.repo
Here is what the contents should look like:
[vmware-tools]
name=VMware Tools
baseurl=http://packages.vmware.com/tools/esx/4.1latest/rhel6/$basearch
enabled=1
gpgcheck=1
It is now time to run the actual install of VMware tools. In my case I am installing on a server system without X11 graphical interface so this is the minimum install:
# yum -y install vmware-open-vm-tools-nox
If you are installing on a workstation or server with X11 installed and would like the VMware display adapter and mouse drivers loaded use this command. The install will be a bit bigger:
# yum -y install vmware-open-vm-tools
You are now up and running with VMware tools!
Hello,
Thanks for your article. Have you ever tried this on Scientific Linux or only on RHEL6?
I’m starting deployment of scientific linux here and i’m stuck with VMware-tools that can’t get installed on SL6, it needs to be rebuilt and it’s kinof a problem as i’m installing them in my kickstarts…
I found your article and thus tried the yum repo way, but no luck the vmware-open-vm-tools-common package fails every time with a bad cpio rename error…
If you have any trick under your sleeves i’m listening :)
Regards,
Oliver
Hi Oliver,
Yes, I most certainly have tried this on Scientific 6. Perhaps you received the error because you had already tried installing the VMware tools through the vSphere client and there was some conflict? I was successful in installing the tools via yum on a fresh Scientific install, with only the “minimum server” package set selected during the install.
Are you a migrating from “another” Red Hat based distro? I was, and Scientific is performing very well for me.
Best Wishes,
Aaron
Howdy Aaron,
Once again thanks for a nugget of goodness.
Not sure if you had tested this on CentOS 5.x but thought I’d let you know that it worked with out issue.
It may be interesting to note for cPanel/WHM administrators that are in a VMware environment that this works for them as well. As I believe there is an issue when trying to install VMware tools via vSphere.
Cheers
Ben
Thanks for the info, Ben. It’s nice that VMware is providing a repository for the tools for quite a few distros and versions now.
Best Wishes,
Aaron
Thanks a lot for this tuto !
I had installed VMWare Tools on my Centos 5.6 guest running on a ESX 4.1 !
Works Fine ! But it’s normal that the statut of VMware Tools is ‘Unmanaged’ ?
Yes, Kisscool, the VM Tools show up as Unmanaged on mine too and no issues are present. This may prevent you from initiating an upgrade of the tools from the vSphere Client or PowerCLI, but the updates will be handled through the operating system method when you run “yum update”. This means that the tools will be updated when a new update to ESX(i) 4.1 is released, however I have not had an issue with newer versions of the tools on older update versions of ESXi (at least within the major release versions).
Best regards,
Aaron
The reason it shows as unmanaged is that the vmtoolsd is not started.
Try starting it manually to see if the status changes.
/usr/lib/vmware-tools/sbin/vmtoolsd &
Can you use RHEL6 vmware tools and install it on Scientific Linux 6?
Absolutely, Scott. I am running Scientific Linux 6 with the VMware tools built for RHEL6 and it works very well.
Aaron
the tools did load for me @ 1st, go figure you need to be running the correct architecture version :)
reworked the /etc/yum.repos.d/vmware-tools.repo file
[vmware-tools]
name=VMware Tools
#baseurl=http://packages.vmware.com/tools/esx/4.1/rhel6/i686
baseurl=http://packages.vmware.com/tools/esx/4.1latest/rhel6/$basearch
Good catch, SomeGuy. Much better to use the shell variable $basearch so it applies to all architectures. Also pulling from 4.1latest should keep the tools updated as the 4.1U versions are released. Thanks.
I updated the post to reflect your changes.
Regards,
Aaron
Great write-up on vmware tools, I am switching to Scientific Linux as well.
This article was very helpful. I ran into one problem: When copying and pasting the line to create the yum repo file (into putty), the shown double quotes cause the [$basearch] to be removed from the resulting file content. This appears to be fixed by adding a backslash ‘\’ in front of the ‘$’ of ‘$basearch’. For example, change:
# echo -e “[vmware-tools]\nname=VMware Tools\nbaseurl=http://packages.vmware.com\
/tools/esx/4.1latest/rhel6/$basearch\nenabled=1\ngpgcheck=1” > /etc/yum.repos.d\
/vmware-tools.repo
# echo -e “[vmware-tools]\nname=VMware Tools\nbaseurl=http://packages.vmware.com\
/tools/esx/4.1latest/rhel6/\$basearch\nenabled=1\ngpgcheck=1” > /etc/yum.repos.d\
/vmware-tools.repo
Dan
Thanks Dan. Always important to escape special characters contained within double quotes.
What did I do wrong? It seems like basesearch
http://packages.vmware.com/tools/esx/4.1latest/rhel6/i386/repodata/repomd.xml: [Errno 14] HTTP Error 404 : http://packages.vmware.com/tools/esx/4.1latest/rhel6/i386/repodata/repomd.xml
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: vmware-tools. Please verify its path and try again
I was very excited to see this as it’s quite difficult installing vmware-tools. Unfortunately I got this error:
Installing : vmware-open-vm-tools-common-8.3.7-434937.el6.x86_64 2/3
Error unpacking rpm package vmware-open-vm-tools-common-8.3.7-434937.el6.x86_64
error: unpacking of archive failed on file /usr/lib/vmware-tools/lib64: cpio: rename
Any ideas what I need to do to fix that? I’m on ESXi 4.1 and installing vmware-tools on CentOS 6 64 bit.
For those having the cpio error: I renamed the /usr/lib/vmware-tools/lib64 dir to lib64-bad and did a “yum reinstall” and it worked.
Looks like the non-yum install of the tools creates a real dir. This method uses a symbolic link:
drwxr-xr-x 6 root root 4096 Apr 18 15:42 lib/
lrwxrwxrwx 1 root root 3 Sep 14 2011 lib64 -> lib/
lrwxrwxrwx 1 root root 3 Sep 14 10:37 lib64;4e70e656 -> lib/
lrwxrwxrwx 1 root root 3 Sep 14 10:45 lib64;4e70e84c -> lib/
drwxr-xr-x 3 root root 4096 Sep 14 10:37 lib64-bad/
I can confirm that your method worked for me too. Thanks very much!
The above echo commands produced errors using bash on cents 6. The $ and the \ before the newline needed to be escaped. This worked for me:
echo -e “[vmware-tools]\nname=VMware Tools\nbaseurl=http://packages.vmware.com/tools/esx/4.1latest/rhel6/\$basearch\\nenabled=1\\ngpgcheck=1″ > /etc/yum.repos.d/vmware-tools.repo
Kimi
The above echo commands produced errors using bash on cents 6. The $ and the \ before the newline needed to be escaped. This worked for me with all the \n escaped.
echo -e “[vmware-tools]\\nname=VMware Tools\\nbaseurl=http://packages.vmware.com/tools/esx/4.1latest/rhel6/\$basearch\\nenabled=1\\ngpgcheck=1” > /etc/yum.repos.d/vmware-tools.repo
Kimi
Thanks
This helped me install VMware tools on Centos 6 64 bit.
Shvek Singh
This helped me install vmware tools onto centos 6 64bit on esxi 4.1. BUT I now moved the vms to esxi 5.0 and vsphere client claims the vmware tools version is “3rd-party/independent” and I am unable to update it. I have performed a ‘yum remove vmware-open-vm-tools’ and deleted ‘/etc/yum.repos.d/vmware-tools.repo’ but when I attempt to install the newest version of vmware tools from the mounted iso I receive a failed error message informing me to first remove the repo etc. Help?
Hi ytot,
I have recently updated some of my ESXi servers to v5. I upgraded the VMware tools using this procedure which continues to use the VMware provided repository:
https://aaronwalrath.wordpress.com/2011/10/04/updating-vmware-tools-on-red-hat-enterprisescientificcentos-linux-6-for-vmware-esxi-5/
The update process above requires the version of yum to be updated, I’m not sure if the latest version of CentOS provides it since 6.1 is not yet released. I can confirm that it works with Scientific Linux 6.1.
Cheers,
Aaron
Hi.
I’m having trouble with Fedora 15. I can’t see any shared folders. I’m expecting to see /mnt/hgfs/Projects shared from my Windows 7 host. I’ve tried with a Centos 5 VM and the share appeared as expected. Is this an issue with Fedora 15? Am I missing something?
Many thanks,
Richard
I would still like to know what the problem is but I did find a suitable workaround by mounting the share separately using cifs e.g.:
mount -t cifs -o username=myusername,password=mypassword //192.168.206.68/Projects /mnt/win
Good article. I’m not seeing my shared folder. Host is Windows 7 with vmware player. Guest is Scientific Linux 6.1. the yum install described here worked with no problems. I enabled a share in vmware player. On reboot there is no shared folder in Linux. vmtoolsd is running.
Any ideas?
For ANYONE having a problem with ESXi v5 and CentOS 6/6.1/6.2 with VNC…
Uninstall TIGERVNC-SERVER
Install TIGHTVNC-SERVER
Once I did that (incidentally the configuration is exactly the same), my mouse and keyboard magically started working in VNC clients connecting to my Guest OS WITH VM Tools installed. Figured I would post this in all the forums that did not mention the solution.
This helped me install VMware tools on Centos 6 64 bit without issue
Thank you.