How does a host PC remain free from viruses on a VM?

255 views

Hello everyone,

I recently heard that a host PC is unaffected from viruses that have infected a virtual machine on that PC? How can this be the case, as both share the same hardware?

In: 9

6 Answers

Anonymous 0 Comments

Everything that happens in the guest is controlled by the host.

The guest has a complete operating system, like Windows. Windows starts up and starts doing the normal things it does when it boots a computer. The trick is that when it tries to access the hardware, the host intercepts it and gives it access to “pretend” hardware.

For example, when the guest tries to access its hard drive, the host pretends it only has a 10 GB HD. Really it’s accessing a 10 GB file on your larger hard drive, but the guest can’t tell the difference.

It’s kind of like the Truman Show, if you’ve ever seen that movie. The guest thinks it’s running on real hardware, but really the host is intercepting its attempts to interact with its hardware and simulating hardware.

That doesn’t mean it’s impossible for a virus to escape a VM. That has happened, when there are serious bugs in the VM software, and a virus specifically exploits those. Overall those bugs are rare and VMs are designed to be very secure.

You are viewing 1 out of 6 answers, click here to view all answers.