VMware Cloud Community
ageinghippy
Contributor
Contributor

How to tell if vmware tools is out of date from within Windows Guest

I would like to be able to find out if vmware tools is out of date on a windows guest by looking in registry - a file or run a command - I know the icon has an exclamation mark on it - but from within a script does anybody know how to tell?

Tags (3)
0 Kudos
12 Replies
malaysiavm
Expert
Expert

you should check this on the vcenter status bar for the VM farm, that will be much more easier.

Craig vExpert 2009 & 2010 Netapp NCIE, NCDA 8.0.1 Malaysia VMware Communities - http://www.malaysiavm.com
0 Kudos
piaroa
Expert
Expert

I don't know a way to check it from the guest OS. But you can use PowerCLI or tools like RVtools for that.

If this post has been helpful/solved your issue, please mark the thread and award points as you see fit. Thanks!
0 Kudos
ageinghippy
Contributor
Contributor

Thanks for the replies, but what I was after was something I could put in a batch file to test if version was out of date 

0 Kudos
idle-jam
Immortal
Immortal

i'm afraid the only way is mentioned as above, either by powercli, vcenter only and not within the guest.

Dave_Mishchenko
Immortal
Immortal

You could build a script around the following command, but you would need to hard code the current version.  As others have stated there are other ways to query this.  You can also set a VM to check the Tools version when it boots and to upgrade automatically.

C:\Program Files\VMware\VMware Tools>vmwaretoolboxcmd -v
8.3.1.954 (build-233645)

0 Kudos
ageinghippy
Contributor
Contributor

that gets you the version of vmware tools on the guest - but how do you know what version is available on the host to know if its up to date or not (we have many hosts all at different versions).  Think I may have to give up with this one - many thanks for your replies.

0 Kudos
jreininger
Enthusiast
Enthusiast

Im a .vbs guy so..  you could do something like this too..

FilePath = "C:\Program Files\VMware\VMware Tools\vmwaretray.exe"
Set fso = CreateObject("scripting.filesystemobject")
MsgBox fso.GetFileVersion (FilePath)

You could then easily get from WMI too.  Get from all VMs, drop in excel,  could even compare to the highest version.  Let me know if you want code for that, very easy.  This could be done just as easily in PS I guess too..

I got:

8.0.2.14744  for 4.0 Update 1 tools

8.3.7.3827   for 4.1 Update 1 tools

VMware VCP 3.5 VMware VCP 4.0 VMware VCP 5.0
0 Kudos
ageinghippy
Contributor
Contributor

Thanks - its what version do you compare against to know if the one on the guest is out of date - like you I have a range of versions which will show as up to date (or not) depending upon the host (currently 8.3.2.2658, 8.0.2.16474,7.4.6.5692 & 8.0.3.19531)

0 Kudos
jreininger
Enthusiast
Enthusiast

Here try this zip file (at own risk) but its just reads in a .txt file of your VMs

It just then just hooks to each VM

And dumps the tool version in Excel.

(it doesn’t check or have error handling at all, ie if your tools are installed someplace else, etc)

You must be a admin on the remote machine (as it using C$)

You must have Excel installed locally.

Since I have all my hosts on  4.1 Update 1 its easy for me.

But I guess if you have a mix of host versions (4.0, 4.0 U1, 4.1, 4.1 U1) not sure if you would want to update the tools on VMs beyond the host its running on.

In reality PS is the way to get all from vCenter.. Get the host version, have a table of host to tools version, and ensure then the tool version is at least the host version.

"My" method does not rely on vCenter server.

VMware VCP 3.5 VMware VCP 4.0 VMware VCP 5.0
0 Kudos
ageinghippy
Contributor
Contributor

thanks again - but that just gives a list of the version of vmware tools on each guest - what I wanted to know was if it was out of date.

0 Kudos
jreininger
Enthusiast
Enthusiast

Not sure how old this is but this script just gets the max tools version and if tools is less than that, we know its old..

BUT I agree, the VMtools.exe knows, I assume from directly talking w/ the host if the tool is out of date or not..

I wonder how they are doing that?

http://www.thescriptlibrary.com/Default.asp?Action=Display&Level=Category3&ScriptLanguage=Powershell...

ForEach ($VM in $VMs)
{
$MyVM = "" | Select-Object Name, ToolsVersion
$MyVM.Name = $VM.Name
$MyVM.ToolsVersion = $VM.Config.Tools.ToolsVersion
If (($MyVM.ToolsVersion -lt $MaxTools) -and ($MyVM.ToolsVersion -gt 0) -and ($VM.GuestHeartbeatStatus -eq "green"))
{
$BuildNumbers += $MyVM
$UpgradeFound = $True
}
}

VMware VCP 3.5 VMware VCP 4.0 VMware VCP 5.0
jreininger
Enthusiast
Enthusiast

Here is something from the VDK

http://www.vmware.com/support/developer/vc-sdk/visdk41pubs/vsp41_vsdk_prog_guide.pdf

Page 106

Use the ToolsConfigInfo data object in VirtualMachineConfigSpec.toolsInfo property to specify the

settings for the VMware Tools software running on the guest operating system.

Humm...

VMware VCP 3.5 VMware VCP 4.0 VMware VCP 5.0
0 Kudos