Trying to upgrade VMware Tools can sometimes be a difficult task. There are multiple ways to upgrade it, just as there are multiple ways to install it. At my company, the best way we have found was to use Cobbler and RPM to install VMware Tools.
Here is the link to the Repository: http://packages.vmware.com/tools/esx/
We sync with the repository daily to ensure we always have the updated tools package. Once we have those repo’s available, we include them into our Kickstart scripts by checking to see if the host is a VMware server or not.
Now that you have VMware Tools installed, imagine you are happily installing Tools on all your VM’s and one day you decide to upgrade to the latest version of ESX and decide Tools needs to be updated as well.
Lets start off with RHEL5 first, you decide to use the normal:
yum update vmware\*
Unfortunately, you will see this error instead:
Transaction Check Error:
file /lib/modules/2.6.18-8.el5/extra/vmware-tools-vmxnet3/vmxnet3.ko from install of kmod-vmware-tools-vmxnet3-18.104.22.168-22.214.171.124.el5.3.x86_64 conflicts with file from package kmod-vmware-tools-vmxnet3-126.96.36.199-188.8.131.52.el5.3.x86_64
file /lib/modules/2.6.18-8.el5/extra/vmware-tools-vmxnet/vmxnet.ko from install of kmod-vmware-tools-vmxnet-184.108.40.206-220.127.116.11.el5.3.x86_64 conflicts with file from package kmod-vmware-tools-vmxnet-18.104.22.168-22.214.171.124.el5.3.x86_64
file /lib/modules/2.6.18-8.el5/extra/vmware-tools-pvscsi/pvscsi.ko from install of kmod-vmware-tools-pvscsi-126.96.36.199-188.8.131.52.el5.3.x86_64 conflicts with file from package kmod-vmware-tools-pvscsi-184.108.40.206-220.127.116.11.el5.3.x86_64
Well that just makes me a very sad panda. I’ve tried just upgrading partial packages, but still nothing will get this to install, until now. RHEL5’s solution is actually very easy. The solution is:
yum install yum-kmod
The ‘yum-kmod’ package is there to help facilitate any package that involves the kernel. Once you install the package, you can run the update again on your host, and VMware Tools will properly install.
With RHEL6, the upgrade is not as easy as it is for RHEL5. First, there is no yum-kmod package (more about this in a second) that will help facilitate the install of kernel modules. If you try to update VMware Tools via yum, you will see an error like this:
Error: Package: kmod-vmware-tools-vmci-18.104.22.168-22.214.171.124.el6.x86_64.3.x86_64 (@ESX5_VMTools_RHEL6-x86_64)
Requires: vmware-tools-vmci-common = 8.6.5
Removing: vmware-tools-vmci-common-8.6.5-3.x86_64 (@ESX5_VMTools_RHEL6-x86_64)
vmware-tools-vmci-common = 8.6.5-3
Updated By: vmware-tools-vmci-common-8.6.10-1.el6.x86_64 (ESX5u2_VMTools_RHEL6-x86_64)
vmware-tools-vmci-common = 8.6.10-1.el6
Error: Package: kmod-vmware-tools-vsock-126.96.36.199-188.8.131.52.el6.x86_64.3.x86_64 (@ESX5_VMTools_RHEL6-x86_64)
Requires: vmware-tools-vsock-common = 8.6.5
Removing: vmware-tools-vsock-common-8.6.5-3.x86_64 (@ESX5_VMTools_RHEL6-x86_64)
vmware-tools-vsock-common = 8.6.5-3
Updated By: vmware-tools-vsock-common-8.6.10-1.el6.x86_64 (ESX5u2_VMTools_RHEL6-x86_64)
vmware-tools-vsock-common = 8.6.10-1.el6
Not a fun time in upgrade-ville to say the least. The reason that we are seeing different packages than we did in RHEL5 is because yum already has the yum-kmod built in. So, the problem isn’t directly with the kernel modules, but the way that VMware did it’s packaging for these RPM’s. Hopefully, in ESX 5.1, they fix this issue, but I haven’t tried that one out yet. I’ll update everyone once I get around to upgrading our 5.1 VM’s.
The solution for this is a little bit more brute force. Instead of having a package help us, we are going to have to remove the troubling packages first, upgrade VMware Tools, and then reinstall the missing packages. Not very hard but it can freak a few people out since we have to uninstall a few packages.
The way we upgrade is all done with one command line command:
yum -y erase vmware-tools-vmci-common vmware-tools-vsock-common; yum -y install vmware-tools-esx-kmods; yum -y update vmware\*
This starts off by removing VMCI and VSOCK from VMware Tools. In truth, most people are not using VMCI or VSOCK very much, as the solution really didn’t take off as much as VMWare would like. Even so, you are only removing that functionality for a second, while upgrading everything else before putting them all back. The core functionality of VMware Tools still remains, VMCI and VSOCK are just extra functionality that can be used if desired but is not required.
Updating VMWare Tools isn’t that difficult at all, but it did take some banging of my head on the desk for a while, till I figured out what was really going on. I hope VMware fixes a few of these problems. The kmod issue with RHEL5 is easy to fix and that is fine by me, but the idea of uninstalling and reinstalling packages in order to really upgrade them just doesn’t seem “nice and clean” as it should be. Hopefully VMware gets around to updating the RPM’s and getting us back on the road to simple “yum update” functionality.