Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
up vote 1 down vote accepted

Edit: it's 2016 now and I still have to deal with these. I now think that cronjobs on the hosts are not reliable at all. The tool I now use to get lists and run basic tasks is govc, vmware's official open source project written in go (cross platform, single binary):

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/ 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 '15 at 10:29
Yes, and spaces, too. I remove these. – Roman Grazhdan Jan 22 '15 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
@RomanGrazhdan: In my Web client, the export button was in the right-bottom corner. – i08in Apr 7 '15 at 7:01


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 '15 at 22:13

To Export a complete list of VMs in 5.5, open the Web Client. Then click on your data center then click on the Virtual Machines tab. Select all VMs then at the very bottom right of the list of VMs you'll see the number of objects. CTRl Click the Paper Icon to export your list. This works.

share|improve this answer

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.