Processes running within a virtual machine should behave almost identically to that running on the host. This statement is more or less true for the majority of user applications. After all the primary goal of various virtualization technologies is to create a virtualized runtime environment within which the user processes could see no difference between the virtualized world and the real world.

So how would you tell if you are running within a virtual machine? I am sure that there are many ways you can do this pragmatically (see this article on codeproject).

It seems that we can also detect this difference visually by observing the idle process time against the real clock time. Suppose that you are running a copy of VMWare workstation, you will notice that the system idle process time elapses at roughly half the pace as would on a physical machine. For example, if you reboot your physical machine and launch a virtual machine right after the reboot, both idle process times would be reset to zero at roughly the same time. Now, if you wait for a couple of hours, you would see that the idle process time on the physical machine is roughly 2 hours, while the idle process time in a virtual machine would be only 1 hour.

While I am not sure what kind of impact this phenomenon would have on any real world applications, this is certainly something very interesting…

Be Sociable, Share!