Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Query ESX servers for VMware tools version

Posted on 2010-01-05
12
Medium Priority
?
813 Views
Last Modified: 2013-12-16
I have a large VMware ESX environment, running Windows Server clients.  I want to get a report that tells me the version of the VMware Tools installed on each client server.  What's the easiest way to do this?
0
Comment
Question by:xi2pay
  • 5
  • 4
  • 2
  • +1
12 Comments
 
LVL 24

Expert Comment

by:ryder0707
ID: 26180558
If you plan to check if each VM has the latest tools, you can use Glenn's powershell script to auto install if the tools is old
http://get-admin.com/blog/?p=714
0
 

Author Comment

by:xi2pay
ID: 26180939
Thanks for the post.  This will come out handy, but still need to generate the report first.
0
 
LVL 10

Expert Comment

by:nabeelmoidu
ID: 26181840
if you've got ssh enabled on all of them

just do ssh root@esxserver " vmware-config-tools.pl -h"

for each of the servers

put a bash for loop if you've got a list of the servers
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

by:xi2pay
ID: 26181930
i like where you're headed, nabeelmoidu. two problems for me, though:

1) there's over 300 servers in the environment. is there an easy way to output all their names to a text file?

2) also, i am not familiar with perl.  i can put a working perl script together if you get me started with some sample code that i can modify, if you can't whip the script up real quick yourself.

Thanks again guys.
0
 
LVL 10

Expert Comment

by:nabeelmoidu
ID: 26182165
put all your esx ips in a text file
one ip in each line

then
for i in `cat iplist.txt`
do
 ssh root@$i " vmware-config-tools.pl -h" ;
done


but you'll have to enter the passwords each time
let me check if I can do something with
expect for that
0
 
LVL 10

Expert Comment

by:nabeelmoidu
ID: 26182409
http://bash.cyberciti.biz/security/expect-ssh-login-script/


so that script would do automatic ssh
so combining that with ours

for i in `cat iplist.txt`
do
 ./sshlogin.exp password $i  vmware-config-tools.pl -h
done




0
 
LVL 21

Expert Comment

by:za_mkh
ID: 26183061
If you have vCenter Server, this could be done easily ... if you have SQL skills.
You can find this information in one of the tables, but since I am not connected to work today, I can't tell you what it is ... sorry!
 
0
 

Author Comment

by:xi2pay
ID: 26185045

99% there...

so the following command (./sshlogin.exp password $i  vmware-config-tools.pl -h) establishes the ssh connection and executes vmware-config-tools.pl -h. Excellent.

What final statement do I add to tell it to pipe the results to a text file?


0
 
LVL 10

Expert Comment

by:nabeelmoidu
ID: 26187511
put it in a script file say list.sh

when executing it,
./list.sh > output.txt
0
 
LVL 10

Assisted Solution

by:nabeelmoidu
nabeelmoidu earned 600 total points
ID: 26187512
I mean put this in a script

for i in `cat iplist.txt`
do
./sshlogin.exp password $i  vmware-config-tools.pl -h
done
0
 
LVL 21

Accepted Solution

by:
za_mkh earned 1400 total points
ID: 26188759
Just wrote a query in SQL querying the vcenter database that does this across your entire estate in seconds!
So connect to your vCenter DB using SQL management studio.
The run this query
select Name, dns_name, tools_status, tools_version_status, Tools_version from vpxv_vms
inner join vpx_vm on vpx_vm.id = vpxv_vms.vmid
0
 

Author Closing Comment

by:xi2pay
ID: 31672918
Thank you for the information guys.  The sql solution is especially handy.  I split the points up in as fair a fashion given the effort and the solution.  Thx.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, I will show you HOW TO: Suppress Configuration Issues and Warnings Alert displayed in Summary status for ESXi 6.5 after enabling SSH or ESXi Shell.
I have written articles previously comparing SARDU and YUMI.  I also included a couple of lines about Easy2boot (easy2boot.com).  I have now been using, and enjoying easy2boot as my sole multiboot utility for some years and realize that it deserves …
This tutorial will walk an individual through the steps necessary to enable the VMware\Hyper-V licensed feature of Backup Exec 2012. In addition, how to add a VMware server and configure a backup job. The first step is to acquire the necessary licen…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question