Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

How is it possible to check if the windows server is a virtual server? Is there a command from command promt to check that?

share|improve this question
add comment

5 Answers 5

up vote 7 down vote accepted

In theory, virtualization is undetectable. By practice, it is, because most virtualization solutions provide means for guest->host communication or do not devices / CPU like physical CPU does. But, means for detecting host are provider dependant.

But, most virtualization solutions provided means, which whom you can communicate with host, like VMWare addins which uses "virtual" (nonexisting) port or Virtual PC, which uses undocumented CPU instructions :)

Programming background: http://www.codeproject.com/KB/system/VmDetect.aspx

Tool: http://www.codegurus.be/codegurus/Programming/virtualpc&vmware_en.htm

Other way is to check for devices, which are specifical to VM, like VMWare includes its name in many devices.

For Xen you can use : http://xen-3.1.sourcearchive.com/documentation/3.1.0/xen-detect_8c-source.html (Should be easy to compile under Win32).

Theretical background: http://thread.gmane.org/gmane.comp.emulators.kvm.devel/22643

share|improve this answer
add comment

You could check by MAC addresses. If it starts with

  • 00:0C:29 VMWare (auto)
  • 00:50:56 VMWare (manual)
  • 00:16:3e Xen

The VPS provider can change the MAC address ranges (in Xen at least) but most don't bother in my experience.

share|improve this answer
add comment

An easy attempt on a WMware guest would be to execute "vmic bios get" and search for the keyword 'wmware'. But i don't know what user rights are required. At least it works as administrator.

Another way would be to look after the graphic card driver. It would also have the vmware keyword in it if it has the VMware tools installed.

share|improve this answer
    
Small typo, I think you mean "wmic bios get". –  boflynn Aug 10 '09 at 16:44
add comment

Dmidecode will certainly give you some obvious pointers for VMWare, and is easilly called from all manner of scripts.

Eg. the system manufacturer is "VMWare Inc" and the base board is listed as a "reference platform".

DMIDecode site - includes link to dos binaries

share|improve this answer
add comment

To test for VMWare the easiest way (assuming you have the ability to log onto the machine) is to check for the presence of the VMWare Tools. This can be found either in the start menu, or as a running application in the systray, or by looking at the file system under Program Files.

I'm not sure if there is an equivalent to VMWare Tools for other virtualization products.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.