Windows 7 VM on Linux – Precautions to Take

virtual machinewindows

I'm thinking of running Windows 7 on a virtual machine on VirtualBox on top of Linux, so that Windows is sort of a "self-contained sandbox" (especially in terms of data storage) for things that require Windows to run.

However, I've heard that running a VirtualBox VM may have some security or stability implications for the host system. What sort of things could the Windows system in a VM do that would mess up the Linux system it runs on?

Best Answer

If you squint, VM security looks a lot like LAN host security. It's just another machine on the network, with the same sort of attendant risks. If you would willingly put a Windows 7 host on the LAN, you shouldn't be especially worried about putting a Windows 7 VM on the VM host.

It is possible to lock a VM down to the point where it is less dangerous to LAN hosts (including the VM host OS) than a separate box connected to the LAN. You can set up host-only networking, for example, so that the VM can only talk to network servers running on the host OS. Or, set it up without any networking at all. That is useful in test environments, where the VM doesn't need to access outside resources. This does make applying security patches harder, but if you only need the VM for testing software compatibility, it could be just the thing.

Desktop VM host systems like VirtualBox have increasing amounts of convenience features enabled by default, especially for Windows and OS X guests. They will do things like share the host user's Downloads, Desktop, and Documents folders with the VM. If you're concerned that the Windows 7 VM might get infected with a network-destructive virus, you should think about turning these features off, since they appear to the Windows guest as a network-shared drive.

Think through the risks. A shared Downloads folder may actually increase security if you keep it mostly empty, and use it instead of allowing the VM network access. You could download new software and security patches on the host to the Downloads folder, switch into the VM, install it, and delete the file.

Short of such automatic sharing, though, VMs are not especially worrisome tech from a security standpoint. If anything, they're a net positive.

Related Question