Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm doing an inventory of both our physical and virtual machines. I'd like to export a list of virtual machines from vCenter instead of having to type everyone into a spreadsheet. Anybody know of an easy way to do this in vCenter 5.5? I've seen instructions for earlier versions of vCenter but they don't seem to apply to 5.5.

I'm also using the web client, not the full version of vSphere.



share|improve this question

5 Answers 5

up vote 1 down vote accepted

I have a cronjob doing this for me on a regular basis (ESXi comes with ESXi shell which might be more familiar for Linux users).

The command is

vim-cmd vmsvc/getallvms | grep -v Vmid | awk "{print \$2}" 

grep here just removes the header.

Both shell and ssh server should be enabled in order for this to work.

I also run this command before running ghettoVCB so that I always backup all of the machines, no matter if any of them had been migrated or created recently.

share|improve this answer
Please be aware that cron jobs are not persistent between reboots and you'll have to modify /etc/rc.local.d/local.sh to rewrite crontab and restart crond every time. There are plenty of guides for this. –  Roman Grazhdan Mar 4 '14 at 5:48
Do not work with multiline Annotation. –  MUY Belgium Jan 21 at 10:29
Yes, and spaces, too. I remove these. –  Roman Grazhdan Jan 22 at 10:35
  1. Select your Datacenter, cluster or host.

  2. Select the Virtual Machines tab.

  3. Right click an empty area of the window and select "Export List".

  4. Type a file name and click the "Save" button.

  5. Done.

Note that the default file type when exporting the list is htm/html but you can change it to xls or csv (among others).

share|improve this answer
I don't seem to have the "Export List" option in the web client. –  natediggs Mar 3 '14 at 18:23
Sorry. I should have specified using the Windows vSphere client. –  joeqwerty Mar 3 '14 at 19:06
In the new web client, which comes with vsphere 5.5, this can be done like this: select your hypervizor or cluster, go to related objects -> virtual machines and in the left bottom corner you'll see an export button. Click it, pick columns you want (you definitely want the 'Host' column among others) and then click 'generate CSV report' and then 'save'. –  Roman Grazhdan Mar 4 '14 at 5:46


Add-PSSnapin Vim.VMwareAutomation.Core
Connect-VIServer $vCenterServer

Get-VM | Select -Property Name | Set-Content listOfVMs.txt

Somthing similar to that should get you started.

share|improve this answer

We use RVtools. It is free, fast, reliable, and easy to use.


share|improve this answer

In the bottom right of the main virtual machine screen there is an icon to export as a csv. you can select all the items or just one. it allows you to select the different columns for the export also.

share|improve this answer
Do you know of a way to automate this so it can be run on a schedule? –  Tarzan Mar 9 at 22:13

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.