I wanted to write some relevance to determine if a particular endpoint was running in VMWare.
First thing I did was dump all of the SMBIOS values for an example system using this relevance:
unique values of ( ( item 0 of it & name of item 1 of it as trimmed string & "=" & ( (item 1 of it as string as trimmed string) | (item 1 of it as hexadecimal) | "ErrorUnknownValue" ) ) | "ErrorUnknownName") of (name of it & ": ", values of it) of structures of smbios
Which leads me to write more exact relevance like this:
Q: values "product_name" of structures "system_information" of smbios
A: VMware Virtual Platform
T: 0.154 ms
I: plural smbios value
Then to turn this into a true/false boolean value for a fixlet/task or automatic group:
Q: exists (it as string) whose(it starts with "VMware Virtual Platform") of values "product_name" of structures "system_information" of smbios
A: True
T: 0.116 ms
I: singular boolean
How about Non Windows Environments?
We have a lot of non windows environments that we would like to identify, but we haven’t found a practical way to do so.
Have you found anything similar?
I’d expect this relevance to work on a lot of non-Windows virtual environments as well given that it is querying the smbios. Are there particular platforms on which you’re having challenges?
This is the approach we use and it certainly works for Windows and Linux. VMWare workstation will report slightly differently, VMWare,x.x (where x.x is the version of the VMWare Workstation host platform). We use 2 properties, one that pulls the manufacturer the other that pull the model from the smbios, then we can gain visibility of varius virtual platforms such as Microsoft, VMWare, Innotek, Parallels to name but a few.
(if (windows of it or unix of it) then (value "manufacturer" of structure "system_information" of smbios as string as trimmed string) else (if(mac of it) then (string "IOPlatformSerialNumber" of dictionary of service plane of iokit registry) else (nothing))) of operating system
(if (windows of it or unix of it) then (value "product_name" of structure "system_information" of smbios as string as trimmed string) else (if(mac of it) then (cstring "model" of dictionary of devicetree plane of iokit registry) else (nothing))) of operating system
Hi there, I tried to query the uuid information using the relevance below and it failed. But it seems to work with "serial_number’. May I know what do I need to fix that error. Thanks.
Q: values “serial_number” of structures “system_information” of smbios
A: VMware-56 4d a8 88 99 5f 76 02-40 1a 6e 0b 0e 72 cf 46
T: 376
Q: values “uuid” of structures “system_information” of smbios
E: Unrepresentable binary data in binary_string. Not UTF-8.
T: 213
Q: values “uuid” of structures “system_information” of smbios as string
E: Unrepresentable binary data in binary_string. Not UTF-8.
T: 330
I noticed that the system_information on my virtual machine (Windows and Linux) is reporting the same information for serial_number and uuid but just a different format. See below. Should it be different?
system_information: manufacturer=VMware, Inc.
system_information: product_name=VMware7,1
system_information: serial_number=VMware-56 4d 8d 28 87 9c fe 6b-11 9e e5 27 65 b3 b1 8f
system_information: uuid=564d8d28879cfe6b119ee52765b3b18f
system_information: version=None
system_information: wake_up_type=6
Same outputs from these commands:
values “serial_number” of structures “system_information” of smbios
values “uuid” of structures “system_information” of smbios as hexadecimal