How to check the status of VMware Tools per virtual Machine the easy way.
Virtualization - VMware
Written by Allen Sanabria   
Wednesday, 01 April 2009 09:33

The other day I was told to check and see if VMware Tools was installed on every Virtual Machine in our Cluster. I figured this was the perfect time for me to write another script to do this.

Here are a list of things that I want to have in the script...

  • List all Virtual Machines and the VMstatus and Version if installed
  • Check for toolsOK
  • Check for toolsNotInstalled
  • Check for toolsNotRunning
  • Check for toolsOld
  • And last but not least, able to do this either on a per Virtual Machine or on the entire Cluster

Well I was able to do all of the above in a nice Perl Script that I created. It can be downloaded here  vmToolsStatus.pl

 Download vmTools Status Perl Script
File Title:vmTools Status Perl Script (Details)
File Type:pl
File Version:1.1
File Size:4.56 Kb
License:
File Author:
File HomePage:
Downloads:328
Rating: ( Votes)
Your Vote:

perl vmToolsStatus.pl
help : Hiding the command line arguments [--help]
--toolsOld : This will print out all the Virtual Machines with an Old version of vmTools and you need to upgrade
--toolsNotInstalled : This will print out all the Virtual Machines with vmTools Not Installed
--toolsNotRunning : This will print out all the Virtual Machines with vmTools Not Running
--toolsOk : This will print out all Virtual Machines with vmTools running
--all : This will print out all Virtual Machines with vmTools installed or not installed
example : Hiding the command line arguments --toolsOld
example : Hiding the command line arguments --toolsOk
example : Hiding the command line arguments --toolsNotInstalled
example : Hiding the command line arguments --toolsRunning
example : Hiding the command line arguments --all --vm_name "vm_name"
example : Hiding the command line arguments --all  
Remember!!! That in order to use this script you will need the Perl VI SDK installed on your linux box as well as $home/.visdkrc setup correctly

Here is an example .visdkrc...

VI_SERVER = Virtual Console Server
VI_USERNAME = login
VI_PASSWORD = passwd
VI_PROTOCOL = https
VI_PORTNUMBER = 443

 

 

So if you want to list all of the Virtual Machines that are running an incompatible version of vmtools, you will run the script like so..

perl vmToolsStatus.pl --toolsOld
MNS
Status toolsOld and Version 82663

LDAP
Status toolsOld and Version 82663

RHEL 5.2
Status toolsOld and Version 82663

Ramona
Status toolsOld and Version 82663

Luminati
Status toolsOld and Version 82663

Or if you want to list all Virtual Machines that do not have vmtools installed...

perl vmToolsStatus.pl --toolsNotInstalled
SLES
StatustoolsNotInstalled

X86_Model
StatustoolsNotInstalled

Mario
StatustoolsNotInstalled

ZCM
StatustoolsNotInstalled

Bot Hunter
StatustoolsNotInstalled

Or you can do it on a per Virtual Machine basis...

perl vmToolsStatus.pl --toolsOk --vm_name "Mail"
Mail
Status toolsOk and Version 110268

 



Add this page to your favorite Social Bookmarking websites
Reddit! Del.icio.us! Mixx! Free and Open Source Software News Google! Live! Facebook! StumbleUpon! Yahoo! Free Joomla PHP extensions, software, information and tutorials.
Comments
Search RSS
Only registered users can write comments!

3.22 Copyright (C) 2007 Alain Georgette / Copyright (C) 2006 Frantisek Hliva. All rights reserved."

Last Updated on Wednesday, 02 September 2009 07:39