Hi,
Is it programmatically possible inside of a virtual machine whether it is running from WMWare Workstation or ESX?
I'm not really familiar with Visual Studio, and I understand that only the 32-bit Windows C compiler supports inline assembly. If you're using the 64-bit Windows C compiler, you may have to resort to a stand-alone assembler. The basic idea is:
load register %eax with 0x564D5868
load register %ecx with 10
load register %edx with 0x5658
execute the instruction "in %dx, %eax"
Then look at register %ecx. A value of 2 indicates ESX, and a value of 4 indicates Workstation.
Welcome to the Community - The only possible would be to look at the version of VMware tools installed - as Workstation and ESXi install different versions. WHich of course means if VMware tools is not installed it will not help you at all.
Thank you very much JMATTSON,
All our virtual machines are Windows and we are using visual studio 2010 in our project. Could you please provide code for this environement that we can compile and run in visual studio?
I'm not really familiar with Visual Studio, and I understand that only the 32-bit Windows C compiler supports inline assembly. If you're using the 64-bit Windows C compiler, you may have to resort to a stand-alone assembler. The basic idea is:
load register %eax with 0x564D5868
load register %ecx with 10
load register %edx with 0x5658
execute the instruction "in %dx, %eax"
Then look at register %ecx. A value of 2 indicates ESX, and a value of 4 indicates Workstation.
jmattson -- thanks for the platform.c program. This is just what I have been looking for. I used the mingw complier:
http://www.mingw.org/Welcome_to_MinGW_org
and that was fine.
Can I ask -- in an earlier post you say: "Assuming that the isolation controls allow the version to be queried..."? Where could this be allowed or disallowed?
The following option restricts the backdoor port to CPL <= IOPL, so the query would typically fail in user mode, though it would work in supervisory mode:
monitor_control.restrict_backdoor = TRUE
Moreover, I believe that the following option can be used to disable this specific query:
isolation.tools.getVersion.disable = TRUE
Thanks for the info.
A more generic question -- is it always possible to prevent a guest OS from finding out if it is running inside a VM? Or is there always some way for a guest OS to know if it is running inside a VM whatever the VM config settings.
There's always some way to know, particularly from supervisory mode.
Thanks again for the info.
Hi Again,
I have a new problem. Is there a way to read uuid.location information inside virtual machine?
Thanks in advance