Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: Detect if Windows runs in a virtual machine or under linux with wine

23 views
Skip to first unread message

Jonathan de Boyne Pollard

unread,
May 23, 2011, 5:37:44 PM5/23/11
to
> how can I detect (in C language) if a program runs under "on real
> hardware installed windows" or in a virtual machine such as vmware,
> virtualpc, virtualbox or qemu?
>
http://homepage.ntlworld.com./jonathan.deboynepollard/FGA/detecting-x86-virtual-machines.html

Jonathan de Boyne Pollard

unread,
May 23, 2011, 5:47:26 PM5/23/11
to
> Bear in mind that the whole point of a VM is to pretend to be real
> hardware, [...]
>
No, it isn't. This is one of the biggest old wives' tales surrounding
virtualization. The points of a virtual machine are things like
isolation and resource sharing. Virtual machines do not even set out to
exactly mimic real hardwares as their goal, and most certainly do not in
practice. (Many virtual machines provide virtual hardwares and
combinations of virtual hardwares that simply don't exist at all on real
machines.)

Jonathan de Boyne Pollard

unread,
May 23, 2011, 5:58:54 PM5/23/11
to
> If they are not installed, I fear you have no way of telling. That's
> the point of a virtual machine.
>
As mentioned, this is an old wives' tale. The points of a virtual
machine are things like isolation and resource sharing. Exactly
mimicking real hardwares, to the extent that one cannot tell the virtual
from the real, is not a design goal, and it is certainly not a goal that
any virtual machine has reached in practice. There's no *point* in
exactly mimicking real hardwares; and doing so would be inordinately
expensive. A proper, indistinguishable from the real thing, software
emulation of even something like (say) the Cirrus Logic GD5446 would
have to include every single one of the chip's actual quirks and corner
cases. That's very expensive to do -- far beyond the capabilities of
the companies and organizations that write virtual machine softwares,
given that the same level of effort would have to be put into all facets
of the virtual machine, not just the CPU and the display adapter chip.

Jongware

unread,
May 24, 2011, 6:15:43 AM5/24/11
to

I was duly impressed by encountering a Sinclair Spectrum emulator that
took cpu and memory heating into account ...

(Oh well -- the Z80 is so old all of its quirks are quite
well-documented by now, and it's so slow it's possible to make a good
emulator in Java.)

[Jw]

0 new messages