Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Exporting info from vmhosts 1

Status
Not open for further replies.

ctrlgrid

Technical User
Aug 28, 2010
1
GB
Need to do reporting on vm's. Is there a way to dump/export a list of vm's in the hosts? If possible, other parameters for each vm's.

Thanks
 
Using Putty, try running the following command at the bash prompt: vmware-cmd -l
This will list something like this:
************
/vmfs/volumes/########-########-####-############/MyVM1/MyVM1.vmx
/vmfs/volumes/########-########-####-############/MyVM2/MyVM2.vmx
...and so on
************
If you want to print it to a text file, just type: vmware-cmd -l > /my/desired/path/Host1VMs.txt
Then use something like WinSCP to grab the text file.

If you're looking at information about the host itself, datastores, etc, try running the command: esxcfg-info -h to get a list of switches, then run those into a text file.

There are many other esxcfg-?????? commands you can run, just Google it up.

I've never bothered printing out lists of VM's (I'm running about 30 VM's per host and have 4 hosts), because with HA/DRS enabled on agressive, the machines don't stick around too long to make it worth while. But, maybe you have a better reason.

Hope this is kind of what you're looking for.
 
a nice little free utility out there is called RVTools. it will report on essentially every piece of your VMware infrastructure

I hate all Uppercase... I don't want my groups to seem angry at me all the time! =)
- ColdFlame (vbscript forum)
 
eritguy said:
Using Putty, try running the following command at the bash prompt

That assumes the user isn't on ESXi. Just gotta mention, I've heard rumors from a reliable source that version 5 (due out in about a year) will remove the console all together. No SSH option at all.

If you're looking for some software VKernel has some inventory software that is fairly inexpensive and gives some really nice detail of your VM's including hardware. Pretty much everything you'll need. If you're looking for just a one time thing, download the trial and get your info.

Cheers
Rob

The answer is always "PEBKAC!
 
While you can SSH to an ESXi host, the commands are limited. The use of tools will now be the main way to communicate with the hypervisor. RVTools is certainly a great tool. There are also a plethora of powershell scripts on the net to accomplish all sorts of tasks. Also look for PowerGUI and VESI. And VMware offers the vMA appliance that has the RemoteCLI and Perl SDK all set up. Unless things have gone really south for a host, there should be no reason to SSH to it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top