Vmware-checkvm

From VI-Toolkit
Revision as of 21:01, 5 May 2018 by Wila (talk | contribs) (Created page with "== vmware-checkvm == The vmware-checkvm command is part of vmware-tools and allows you to check some vmware properties about your VM. When run without parameters it returns...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

vmware-checkvm

The vmware-checkvm command is part of vmware-tools and allows you to check some vmware properties about your VM.

When run without parameters it returns the software version, from the looks of it, it returns the host major version number. Eg. vSphere 6.5 returns "VMware software version 6 (good)"

What is probably more interesting though is that it also returns if we are running (return value is 0) or not (return value is 1). If VMware tools is installed on a physical host it will return "Not running in a virtual machine." with return value 1.

You can run the command without privileges.

There are also some parameters you can use, but all of them are undocumented.

Parameters

The following parameters can be used:

  • r - return screensize in width x height.

Eg.

vmware-checkvm -r
1024 768

for a screensize of 1024 pixels wide and 768 pixels heigh.

  • p - print out product that it is running on. Not all host types are recognized, known values are:
ESX Server
Workstation
Unknown

Eg.

vmware-checkvm -p
ESX Server
  • h - hardware version, this is the virtual hardware that the virtual machine is running.

Eg.

vmware-checkvm -h
VM's hw version is 4

External Links

https://github.com/vmware/open-vm-tools/tree/master/open-vm-tools/checkvm