Identifying installed VM guestOS via Casper

While wondering about ways to increase our visibility on clients, we came to the realization that we were clueless about Virtual Machines.
We could tell who had virtualization software installed (Parallels,VMware Fusion,VirtualBox) but beyond that nothing.

Using Casper I was easily able to tally the count and boy suffice to say, lot of folks had virtualization software installed which to a certain extent was understandable since most were engineers.
The bigger problem was, we had unmanaged VMs circulating on our network and were blind to what kind. While Linux VMs are less of a burden, the windows ones were something we had to address and the first part of the problem was knowing who had what.
With that in mind, I wrote a script that goes through the /Users folder on a Mac, identifies if there are VMs, parse through the finding and report back the guestOS of the found VM.
The script is designed to look for the three virtualization software I have mentioned.
You can download the code on my github.

I wrote it with Casper in mind as my reporting tool and as such, it is outputting as an extension attribute but it can easily be converted to any other reporting tool.

In Casper Computer Management, create a new Extension Attribute and paste the code into it.

Screen Shot 2015-05-02 at 2.33.18 PM

That’s it, that was the harder part and now we can just create a smart group to grab the clients where the result is windows.

Screen Shot 2015-05-02 at 2.36.48 PM

Once a recon is run, the smart group will start filling up with Clients and once you select the client, you will know exactly how many VMs are installed.

Screen Shot 2015-05-02 at 2.39.48 PM

Screen Shot 2015-05-02 at 2.40.18 PM

Should there be no VM installed, your results will simply be No VM Found

Screen Shot 2015-05-02 at 2.45.22 PM

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s