72

Is there a way to know if the Windows machine I'm working on is virtual or physical? (I'm connecting with RDP to the machine. If it's a virtual machine it is working and handled by VMWare).

17 Answers17

79

In the CMD window type:

SYSTEMINFO

You will find a line with the following text (or similar):

System Manufacturer:       VMware, Inc.
System Model:              VMware Virtual Platform
Greg
  • 167
castrocra
  • 791
  • 1
  • 5
  • 2
39

If it's Windows, just have a look at the hardware screens. It'll have a billion and five VMWare-branded virtual devices.

Oli
  • 1,829
21

If it's handled by VMware, it isn't too difficult at the present moment. This could change in the future.

# dmidecode -s system-manufacturer
VMware, Inc.
Michael Hampton
  • 252,907
Matt Simmons
  • 20,584
19

In Linux you can also use "virt-what". "virt-what - detect if we are running in a virtual machine".

Greg
  • 167
Mike
  • 22,748
11

On Windows, from CMD:

Systeminfo | findstr /i model

returns something like:

System Model:              VMware Virtual Platform
                           [01]: Intel64 Family 6 Model 26 Stepping 5 GenuineInt
Dan
  • 737
10

On Linux, run this:

$ dmesg |grep -i hypervisor
 Hypervisor detected: KVM
Arash
  • 201
  • 2
  • 2
4

If you are in Windows, as castrocra says, you can run the systeminfo command from inside a cmd shell, then look for the "BIOS Version".

These are probably real machines:

BIOS Version:              Dell Inc. A03, 06/12/2010
BIOS Version:              Phoenix Technologies, LTD MS7254 1.08, 08/03/2007

This, on the other hand, is almost certainly a virtual machine:

BIOS Version:              VMware, Inc. VMW71.00V.0.B64.1201040214, 04/01/2012
Luke
  • 391
4

It has been answered, but FWIW you can do this in powershell:

gwmi -q "select * from win32_computersystem"

The "Manufacturer" will be "Microsoft Corporation" and the "Model" will be "Virtual Machine" if it's a virtual machine, or it should display regular manufacturer details if not, e.g. "Dell Inc." and "PowerEdge R210 II" respectively.

3

On Linux if you prefer to look under /proc try

cat /proc/cpuinfo | grep flags | grep hypervisor
e271p314
  • 131
1

There is another option here which describes the official way to do so:

For Windows:

Click Start > Run. Type msinfo32 and press Enter. In the right pane, look for System Manufacturer for 'VMware, Inc.'

1

Even simpler - wmic /node: bios get serialnumber

Anything that returns a Dell-style serial number is physical.

It will also return "VMware-42 22 26 a8 dd 6e e3 b3-2e 03 fc 2c 92 ae 2e 89", if it's a virtual machine.

0

You could try the "Host Detection" program.

rkthkr
  • 8,728
0

If it's a Unix VM, use imvirt. It's a Perl script that detects VMWare, Xen, and several others.

0

Best way on Windows (PowerShell):

$systemModel = (Get-WmiObject -Class Win32_ComputerSystem).Model

if ($systemModel -match "Virtual|VMware|Hyper-V") { Write-Output "This system is a virtual machine." } else { Write-Output "This system is a physical machine." }

paradroid
  • 888
0

One (relatively) simple way to detect key virtualization information is via WMI / WBEM.  You can use the root\CIM2 namespace and access  the Baseboard class (full of interesting BIOS information) to get a description of the "physical" system.  This class often includes information about the motherboard and chassis  - manufacture, model, serial number, other.

Run the following command from a command prompt or PowerShell session:

wmic baseboard get manufacturer, product, Serialnumber, version
Alex
  • 101
-2

I had the same question and found that there are a lot of processes running with "VM" in the name, for example VMWareTray.exe

Josh
  • 1
-2

nbtstat -a The outcome will tell you as VMs have a speecific prefix which is 00-50-56-XX-XX-XX. There is also another prefix it uses but I can not remember at the top of my head but I recall Vcenter uses 00-50-56-XX-XX-XX so this ios the one I check only.

I think this is the best way, personally.