Windows isolation decision

Sandbox, WSL2 or a full virtual machine?

They can all involve virtualization, but they solve different jobs. Choose by the state you must keep, the kernel you need and the boundary you are willing to trust.

Choose the boundary VMBook on Windows

Developer using a Windows workstation with several displays
Editorial context: one Windows workstation may need disposable testing, Linux development and complete guest operating systems at the same time.

The short decision

Use Windows Sandbox for a temporary clean Windows desktop. Use WSL2 for a Linux command-line and development environment closely integrated with Windows. Use a full VM when you need a persistent machine definition, another operating system, controlled virtual hardware, snapshots, migration or an independent recovery boundary.

The boundaries side by side

Similar foundations do not make them interchangeable.

DecisionWindows SandboxWSL2Full virtual machine
Primary jobRun or inspect something in a disposable Windows desktopRun Linux tools and distributions beside WindowsOperate a complete, durable computer
StateClosing the sandbox discards installed software, files and stateDistribution files persist in its managed virtual diskDisks, firmware state and machine configuration persist
KernelA separate Windows kernel under Microsoft’s hypervisorA Microsoft-maintained Linux kernel in a managed VMThe kernel installed by the guest owner
Guest choiceThe Windows environment supplied from the hostSupported Linux distributionsWindows, Linux and other supported architectures or systems
Hardware modelIntentionally limited and managed by WindowsManaged for the WSL workflowExplicit CPU, memory, firmware, disks, networks, display and devices
Best recovery modelClose it and start cleanExport, import and back up the distribution dataIndependent backup plus tested machine restoration

Windows Sandbox

Disposable does not mean disconnected.

Windows Sandbox is included with supported Pro, Enterprise and Education editions; Microsoft does not currently support it on Windows Home. It uses a dynamically generated Windows image and a separate kernel, while sharing selected host resources for efficiency.

Networking is enabled by default through the Hyper-V default switch. Clipboard and other redirection can also cross the boundary. A mapped host folder—especially a writable one—lets software in the sandbox reach real host data. For an unknown application, disable networking where practical, map only the required folder, make it read-only and keep unrelated credentials outside that path.

VMBook architecture and acceleration settings on a Windows virtualization host
Real VMBook interface: host acceleration and guest architecture remain explicit for full VMs; Windows manages those details for Sandbox and WSL2.

Choose Sandbox when

The test should leave nothing behind.

Open an installer, reproduce a clean Windows issue or inspect a file in a short-lived desktop. Do not choose it for a service or environment that must survive closing the window.

Choose WSL2 when

Linux belongs inside the Windows workflow.

Use Linux shells, packages, containers and development tools while retaining Windows files, Terminal and editor integration. It is not a general replacement for every full Linux VM topology.

Choose a VM when

The computer itself is the artifact.

Keep a defined OS, firmware, disks, networking and devices; run another architecture; preserve a legacy system; or move and recover the complete machine independently.

A safer experiment

Make the Sandbox boundary visible in its configuration.

A .wsb file can disable networking, disable clipboard redirection and expose one host folder read-only. This reduces convenient paths back to the host, but it does not turn unknown software into harmless software. Keep the host patched and avoid secrets in the shared folder.

<Configuration>
  <Networking>Disable</Networking>
  <ClipboardRedirection>Disable</ClipboardRedirection>
  <MappedFolders>
    <MappedFolder>
      <HostFolder>C:\SandboxDrop</HostFolder>
      <ReadOnly>true</ReadOnly>
    </MappedFolder>
  </MappedFolders>
</Configuration>

Where VMBook fits

Keep the Microsoft hypervisor instead of dismantling the Windows stack.

VMBook does not claim to manage Windows Sandbox as a provider. Its Windows value is elsewhere: QEMU can use WHPX while Hyper-V, WSL2, Memory Integrity and other Microsoft-hypervisor features remain enabled; native Hyper-V machines and WSL distributions keep their own provider identity; and full VM definitions expose the architecture, firmware, disks and networks that Sandbox intentionally hides.

This matters when one workstation needs all three boundaries. Use Sandbox for a disposable Windows test, WSL2 for integrated Linux development and VMBook for persistent QEMU or native-provider machines. Test the exact host build and workload: coexistence does not guarantee identical performance to a system where one hypervisor owns the machine exclusively.

01 · STATE

Must it persist?

If no, Sandbox may be enough. If yes, choose WSL2 or a full VM.

02 · KERNEL

Which kernel?

Integrated Linux points to WSL2; arbitrary guest control points to a VM.

03 · HARDWARE

Need devices?

Explicit firmware, controllers, networks or passthrough require a full VM path.

04 · RECOVERY

What must restore?

Choose a complete VM when the whole machine must be backed up and recovered.

Primary sources

Verify Windows behavior against Microsoft.

Microsoft: Windows Sandbox overviewMicrosoft: Windows Sandbox requirementsMicrosoft: Configure a .wsb fileMicrosoft: Comparing WSL versions

Continue

Follow the boundary you chose.

WSL2 or a full VM?VirtualBox, Hyper-V and WSL2 coexistenceHardware virtualization: VT-x and AMD-VVMBook for Windows

Use the smallest sufficient boundary

A disposable test, a Linux workspace and a durable machine are three different promises.

Keep the distinction visible, preserve the host’s security features and validate important workloads before relying on any virtualization path.

Preview VMBook