VMware Communities
okicot
Contributor
Contributor

Is there a way to get list of all VMs, running & non-running, using vmrun?

Hi all,

I am in need of creating a list of running & non-running virtual machines. I am in search of a C++ solution, but a command line would do just fine.

This one, for instance,

     vmrun  -T  ws  list

lists all running VMs, but not turned off ones.

Thank you.

Tags (1)
Reply
0 Kudos
5 Replies
WoodyZ
Immortal
Immortal

The vmrun utility does not have the capability to list VM's that are not running.

Your options are to parse the various files that VMware Workstation stores VM information that it knows about and or search the file system for .vmx configuration files.  Although the latter does not necessarily mean it a complete and or functioning VM.  I guess it really depends on the total scope of the goal how much coding will need to be done.

okicot
Contributor
Contributor

And how about using VIX, could there be a way to achieve my goal of listing non-running virtual machines?

Thank you for the fast response.

Reply
0 Kudos
WoodyZ
Immortal
Immortal

What is it you're actually trying to do, what's the end goal?

Reply
0 Kudos
okicot
Contributor
Contributor

I have a C++ MFC application, where I try to list all virtual machines, running & non-running. Could I use the VIX to achieve this?

Reply
0 Kudos
WoodyZ
Immortal
Immortal

Wow, I already knew that however I was hoping you'd expound on it! Smiley Wink  I'm assuming, since you said "I am in search of a C++ solution", you're a programmer and as such you can just as easily as I review the VIX API Documentation, specifically the VIX API Reference Function Support Matrix at VMware's website.  I did take a quick look and saw nothing relevant however if you're doing the programming then I'd suggest you review it too.

Without knowing more then you said so far, I'll just have to say that my first reply covers it.

Reply
0 Kudos