Skip to main content
Question

VMWare - Guest OS for msft SA compliance

  • March 26, 2014
  • 1 reply
  • 10 views

Forum|alt.badge.img+3

Hey all,
Recently, there has been an effort to get some stats on what msft vms we have running in office. We took a template https://jamfnation.jamfsoftware.com/viewProductFile.html?fid=167 and modified it to the point where it can count the number of vms for that specific guest os. See script for example..

I also checked out Rich's post on http://derflounder.wordpress.com/2012/12/18/pulling-guest-os-information-from-offline-vmware-fusion-vms/

Thought of a kludgie way by using smart groups to add up some vm's but was hoping someone has a better way?

#!/bin/sh
myVMList=`find /Users -name "*.vmx"`

IFS=$'
'
myCount=0
for myFile in $myVMList
do
myGuestOS=`cat "$myFile"| grep "guestOS"| sed 's/guestOS = //g'| sed 's/"//g'`

if [[ $myGuestOS == *windows7* ]]
then
  let myCount=myCount+1
fi
done
echo "<result>$myCount</result>"

unset IFS

1 reply

Forum|alt.badge.img+3
  • Author
  • New Contributor
  • March 26, 2014

duplicate - sorry!