/
/

How to Enable or Disable vGPU Sharing for Windows Sandbox in Windows 10

How to Enable or Disable vGPU Sharing for Windows Sandbox in Windows 10 blog banner image

Windows Sandbox offers users a virtual environment to test different types of software and stage different scenarios without risking your host computer’s OS. In this article, you’ll learn how to enable and disable the Windows Sandbox vGPU.

How to enable or disable vGPU in Windows Sandbox

Since Windows Sandbox is an advanced tool, this will require:

  • Windows 10 Pro or Enterprise, version 1903 (build 18362) or later
  • The Windows Sandbox feature should be enabled. To enable it, search for Turn Windows features on or off in the Taskbar and check Windows Sandbox.
  • Administrative rights to create .wsb configuration files
    • To check if you have Administrator access, open the Start Menu > Settings > User Accounts. The word “Administrator” should be written below your username.

Step-by-step guide

  1. Open File Explorer. Go to the folder where you want to save your sandbox configuration file.
    • Make sure you have file name extension enabled in File Explorer. To do that, go to the View tab in the ribbon and check the File name extensions option.
  2. Right-click in the white space. Select New > Text Document.
  3. Name the file SandboxVGPU.wsb > Enter.
  4. Right-click on the new file. Select Open With > Notepad.
  5. To enable the virtual GPU in the Windows Sandbox, add this code to the document:

<Configuration>

<VGPU>enable</VGPU>

</Configuration>

To disable, use this code instead:

<Configuration>

<VGPU>disable</VGPU>

</Configuration>

  1. Ctrl+S to save. The VGPU should be enabled/disabled in the Windows Sandbox now, depending on your preferences.

Additional configuration options

There are many things you can do in the Windows Sandbox aside from enabling or disabling a vGPU. Depending on what you’re testing, you may need to try out many configurations for your Windows Sandbox to fit your needs fully. Here are some of the things you can do with it:

  • Clipboard redirection – This allows you to copy files from your host machine, such as images, documents, and folders, into the Windows Sandbox. This feature is enabled by default, but you can disable it, depending on your preferences.
  • Networking – Windows Sandbox creates a virtual network card by default to give you access to the Internet. You can disable this.
  • Folder mapping – You can map the folders from the host computer into the Windows Sandbox, so the virtual environment can have the same folders and files as the host workstation. You can enable the read-only setting for each folder as well, so that the files within each folder can be viewed but can’t be edited and content can’t be added.

Here’s a sample configuration code that employs all these settings alongside the setting for the vGPU:

<Configuration>

<VGPU>Disable</VGPU>

<ClipboardRedirection>Disable</ClipboardRedirection>

<Networking>Disable</Networking>

<MappedFolders>

<MappedFolder>

<HostFolder>C:\TestFiles</HostFolder>

<ReadOnly>true</ReadOnly>

</MappedFolder>

</MappedFolders>

</Configuration>

Troubleshooting tips for enabling virtual GPU in Windows Sandbox

Issue: Sandbox won’t launch

Check your computer’s BIOS and confirm that virtualization capabilities are enabled. Accessing the BIOS varies, depending on the manufacturer, but generally, you should restart the computer and press either F10, F2, F12, F1, ESC, or DEL.

If virtualization capabilities are enabled and it still won’t launch, search for Turn Windows features on or off in the Taskbar and make sure Windows Sandbox is enabled.

Issue: Windows Sandbox vGPU not working

Ensure that the configuration files are properly formatted and have the correct .wsb extension. You can also double-check the syntax of the code to make sure that there are no issues.

Issue: Hardware acceleration is still active even after disabling vGPU

Double-check the syntax of the code in the .wsb file. Confirm that the <vGPU></vGPU> tags are correctly spelled and correctly placed within <Configuration></Configuration>.

What is Windows Sandbox?

Windows Sandbox is a sandbox environment native to Windows 10 and Windows 11 computers. In simple terms, it gives users a lightweight and disposable environment where they can stage different scenarios and run software that may not necessarily want to run in their host computer.

All these actions are contained within the sandbox, and everything is wiped clean after the Windows Sandbox is closed. This keeps the host OS safe while also giving users the opportunity to try out different programs and software.

What is the difference between vGPU and GPU?

A Graphics Processing Unit (GPU) is a specialized electronic unit that was mainly designed and used for digital image and video processing. One unit has thousands of computing cores, all able to work simultaneously to efficiently process data in parallel. Originally, it was typically utilized for graphics-related tasks. However, because of its parallel structure, it’s been especially useful for other fields, such as computer-aided engineering (CAE), computer-aided design (CAD), and computer-aided manufacturing (CAM).

A virtual Graphics Processing Unit (vGPU), on the other hand, does the same tasks as a normal GPU but does so through software instead of through a physical chip. It takes one physical GPU that’s installed in a server and turns it into virtual GPUs that can be shared across different virtual machines.

What is vGPU Sharing?

With vGPU sharing, you can enable hardware-accelerated graphics rendering in Windows Sandbox using the host computer’s physical GPU. This can enhance graphics performance and compatibility. However, you should also take care of it since it may create security vulnerabilities and potential attack surfaces, especially in sensitive environments.

When to Disable vGPU Sharing?

There are environments where the virtual GPU can be exploited by bad actors, and it’s important to be aware and ready for that. If you want to maximize security, it’s best to disable the vGPU altogether.

There are also situations where you don’t need a GPU for your virtual environment. If you’re only using non-performance-intensive applications like command-line tools, you might not need the vGPU. If that’s the case, it’s best to keep it disabled and maximize security instead.

Frequently Asked Questions (FAQ) for the vGPU and Windows Sandbox

What is the default vGPU setting in Windows Sandbox?

vGPU sharing is disabled by default. If you want to enable it, follow this step-by-step guide.

Can I force disable vGPU for all Sandbox instances system-wide?

No. Every vGPU and its settings have to be defined in the .wsb file.

Will disabling vGPU make the Sandbox slower?

Yes, particularly if you’re using applications that rely on hardware acceleration, such as video editing software, video playback, and other GUI-heavy applications.

Is vGPU access a security risk?

In some cases, it might pose a security risk since it presents an additional point of attack for bad actors. To prevent a security breach, make sure you follow best practices for virtual GPUs.

Enabling the vGPU in Windows Sandbox for performance and security

The vGPU is disabled by default, but you can enable it with a .wsb file. Keeping it disabled is best for situations where you won’t need a performance boost or if you require better security for your computer. If you’re rendering graphics-heavy testing scenarios or executing performance-intensive tasks, enabling vGPU sharing might be your best option.

The Windows Sandbox gives administrators a lot of control over their staging environments, and enabling vGPU sharing allows them to strike the perfect balance between performance and isolation.

You might also like

Ready to simplify the hardest parts of IT?
×

See NinjaOne in action!

By submitting this form, I accept NinjaOne's privacy policy.

NinjaOne Terms & Conditions

By clicking the “I Accept” button below, you indicate your acceptance of the following legal terms as well as our Terms of Use:

  • Ownership Rights: NinjaOne owns and will continue to own all right, title, and interest in and to the script (including the copyright). NinjaOne is giving you a limited license to use the script in accordance with these legal terms.
  • Use Limitation: You may only use the script for your legitimate personal or internal business purposes, and you may not share the script with another party.
  • Republication Prohibition: Under no circumstances are you permitted to re-publish the script in any script library belonging to or under the control of any other software provider.
  • Warranty Disclaimer: The script is provided “as is” and “as available”, without warranty of any kind. NinjaOne makes no promise or guarantee that the script will be free from defects or that it will meet your specific needs or expectations.
  • Assumption of Risk: Your use of the script is at your own risk. You acknowledge that there are certain inherent risks in using the script, and you understand and assume each of those risks.
  • Waiver and Release: You will not hold NinjaOne responsible for any adverse or unintended consequences resulting from your use of the script, and you waive any legal or equitable rights or remedies you may have against NinjaOne relating to your use of the script.
  • EULA: If you are a NinjaOne customer, your use of the script is subject to the End User License Agreement applicable to you (EULA).