VMware {code} Community
michaelmccollou
Contributor
Contributor

VixHost_FindItems (Want more than just running VMs)

I have really been struggling with a pet project of mine. I need to connect to a VMWare Server host and get an inventory of all the Virtual Machines (not just the running VMs) in the server's inventory. Seems FindItems should be used for this, but docs say it is limited to VIX_FIND_RUNNING_VMS only. Should have just made a function called FindRunningVMs if this were going to be the case Smiley Happy

I would love to keep everything VIX, so if there is something I am missing, please let me know. The only approach I can think of will limit me to Windows only (handles 90% of what I need). My approach will be to use WMI to get the All Users profile then return the contents of vm-list and parse it for an inventory. I am already using some WMI programming to initiate remote shadow copies for my backups so it is not a stretch, but not ideal either.

Any thoughts from anyone?

Thanks

0 Kudos
2 Replies
martin35
Contributor
Contributor

It is not possible to get a list of all Machines from VMware Server 1.0.x with the VIX API.

You can call "vmware-cmd" command from your program to receive a list of all registered Virtual Machines.

I hope ther will be new release of VMware Server and VIX API soon, supporting

this functionality.

stanguturi
VMware Employee
VMware Employee

Download and install the latest vix bundle. In vix.h, you can find a new token VIX_FIND_REGISTERED_VMS that you can use when calling VixHost_FindItems() to get the list of registered VMs.

What other options do you need?

-Thanks

Sankar.

0 Kudos