VMware {code} Community
sorin_bp
Contributor
Contributor

how to determine the guest OS type (Windows, Linux, etc.) with vmrun.exe

Hi,

I am using vmrun in order to start a VM with vmWare Player and I would like to dynammically determine whether the VM I started is a Windows or a Linux one.

The most logical way seemed to use the readVariable command with the runtimeConfig option, as the vmx file contains a line like "guestOS = ...". However, this doesn't seem to work, it hangs and doesn't return. No message whatsoever. The VM has the latest vmWare Tools installed. I tried something like:

vmrun -gu administrator -gp password readVariable "e:\VMs\Oracle_11.2\vm-win7.vmx" runtimeConfig guestOS

Has anyone any idea why this doesn't work?

Has any of you tried to somehow retrieve the OS type of a VM through the vmrun command?

Any tricks you know in order to achieve this seemingly simple goal? (isn't there a nice separate command like the one for retrieving the guest IP: getGuestIPAddress?)

By the way, I also don't understand why the VM has to run even for retrieving a variable defined in the vmx file.

Thank you in advance.

0 Kudos
0 Replies