# Not working in "Windows Sandbox"

**URL:** https://discourse.paraview.org/t/not-working-in-windows-sandbox/15528
**Category:** Development
**Created:** [October 9, 2024, 2:25pm UTC](https://discourse.paraview.org/t/not-working-in-windows-sandbox/15528 "2024-10-09T14:25:22Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![BanucMKappNiles](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@BanucMKappNiles](https://discourse.paraview.org/u/BanucMKappNiles)
#### Post date: [October 9, 2024, 2:25pm UTC](https://discourse.paraview.org/t/not-working-in-windows-sandbox/15528/1 "2024-10-09T14:25:22Z")

</div>

I am using Windows 10 Enterprise and I am trying to run it in “[Windows Sandbox](https://learn.microsoft.com/de-de/windows/security/application-security/application-isolation/windows-sandbox/windows-sandbox-overview)”. It is starting for 2 seconds with a window with white content and then it crashes and closes. Can someone maybe try to run it in Windows Sandbox if it is working or not?

The root problem seems to be that “Windows Sandbox” is running always in a RDP session. See also [Failure to use Paraview with RDP - Development - ParaView](https://discourse.paraview.org/t/failure-to-use-paraview-with-rdp/14123).

ParaView version: 5.13.1

Logged events with eventvwr:

```auto
Faulting application name: paraview.exe, version: 0.0.0.0, time stamp: 0x66f714d4
Faulting module name: unknown, version: 0.0.0.0, time stamp: 0x00000000
Exception code: 0xc0000005
Fault offset: 0x0000000000000000
Faulting process id: 0x530
Faulting application start time: 0x01db1a5c18fe73c0
Faulting application path: C:\Program Files\ParaView 5.13.1\bin\paraview.exe
Faulting module path: unknown
Report Id: 8f174e79-0e71-4ae1-9f6e-a16225f28173
Faulting package full name: 
Faulting package-relative application ID: 

```

 ![Window crashing](https://discourse.paraview.org/uploads/default/original/2X/7/722b2cee5c34ac46c38b7c269e996f81f8616cda.jpeg)  
 ![ParaView - Error](https://discourse.paraview.org/uploads/default/original/2X/5/533dcc25c59d7008646bdf8bf1f7385a32385cee.png)

dxdiag output:

 ![dxdiag 01](https://discourse.paraview.org/uploads/default/original/2X/a/ab61568705249e593f431cf7f6504f53fe5d7ffe.jpeg)  
 ![dxdiag 02](https://discourse.paraview.org/uploads/default/original/2X/8/86f2b58d848792998482cf6d27aa181d66bed146.jpeg)  
 ![dxdiag 03](https://discourse.paraview.org/uploads/default/original/2X/0/0e9a4b08c44c1fdaef5b20a208283ed4f0dce79f.jpeg)  
 ![dxdiag 04](https://discourse.paraview.org/uploads/default/original/2X/c/c185511fdf7fac0aad4613511118ea1c69951315.jpeg)  
[DxDiag.txt](https://discourse.paraview.org/uploads/short-url/e7oXxTle8dxdIZuf8RmQ79PtqXk.txt) (51.9 KB)

---

<div class="post-metadata">

### Author: ![BanucMKappNiles](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@BanucMKappNiles](https://discourse.paraview.org/u/BanucMKappNiles)
#### Post date: [October 10, 2024, 1:31pm UTC](https://discourse.paraview.org/t/not-working-in-windows-sandbox/15528/2 "2024-10-10T13:31:36Z")

</div>

This is a workaround solution. The principle is that instead of a non-persistent virtual machine (Windows Sandbox) a persistent virtual machine is being used with Hyper-V.

1. create a vhdx file of your current system
2. create a new virtual machine from the vhdx file using Hyper-V-Manager
3. passthrough GPU to Hyper-V machine using “GPU Partitioning (GPU-P)”

Details

# create a vhdx file of your current system

Use [Disk2vhd - Sysinternals | Microsoft Learn](https://learn.microsoft.com/en-us/sysinternals/downloads/disk2vhd) to create vhdx of the whole system (EFI partition and Recovery partition included).

 ![image](https://discourse.paraview.org/uploads/default/original/2X/4/45a6892e7c725f215d8c02b9e19b47f194aeaf1f.png)  
Make sure to check “Prepare for use in Virtual PC”.

# create a new virtual machine from the vhdx file using Hyper-V-Manager

- start "Hyper-V-Manager in admin mode  

- create new virtual machine

# passthrough GPU to Hyper-V machine using “GPU Partitioning (GPU-P)”

Basically follow the steps described in [How to Assign (Passthrough) a Physical GPU to a Hyper-V Virtual Machine | Windows OS Hub (woshub.com)](https://woshub.com/passthrough-gpu-to-hyperv-vm/).

Here is a summary of the steps that I had to do:

- start PowerShell in admin mode
- Use the **Get-VMPartitionableGpu** (Windows 10) or **Get-VMHostPartitionableGpu** (Windows 11) command to check if your graphics card supports GPU partitioning mode.
- get the source code of [GitHub - jamesstringer90/Easy-GPU-PV: A Project dedicated to making GPU Partitioning on Windows easier!](https://github.com/jamesstringerparsec/Easy-GPU-PV)
- allow running PowerShell scripts in the current session  
`Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass –Force`  
This step is needed because the script that we want to execute calls another script from the same directory. If you can’t execute this step then you have to execute each step of the following ps1 script manually.
- Run the script (in the directory of Easy-GPU-PV):  
`.\Update-VMGpuPartitionDriver.ps1 -VMName myVM1 -GPUName "AUTO"`  
The script copies the GPU drivers from the host to the VM. This step is needed because the virtual machine doesn’t have the GPU drivers yet in GPU-P mode.
- Now change the VM settings and assign the GPU to it:
  - `Set-VM -VMName myVM1 -GuestControlledCacheTypes $true -LowMemoryMappedIoSpace 1Gb -HighMemoryMappedIoSpace 32Gb`
  - `Add-VMGpuPartitionAdapter -VMName myVM1`

- disable checkpoints  
 ![image](https://discourse.paraview.org/uploads/default/original/2X/a/a9b587157ee7dc91aabcf4c84bdda18b96a37abc.png)  
This step is required because Hyper-V is by default trying to create an automatic checkpoint at the start of the VM. But this is not possible any more with GPU-P enabled.
- test if everything is working by starting the VM and calling `dxdiag`  
 ![image](https://discourse.paraview.org/uploads/default/original/2X/8/8fd54f8ed37a15522fa5f4beec78314d8e971f05.jpeg)  
Without GPU-P enabled there is no tab “Render”.
- test if everything is working by looking at device manager  
 ![image](https://discourse.paraview.org/uploads/default/original/2X/6/6d0c1f58cc200e5c67d21c5145eacec56c837c7a.jpeg)  
Without GPU-P there is just “Microsoft Hyper-V Video” as display adapter and no graphics card.
- test by checking OpenGL version  
 ![image](https://discourse.paraview.org/uploads/default/original/2X/b/bdde659310334ef1eda380f4a6746325351d962d.jpeg)  
here it is 4.6.0, without GPU-P the OpenGL version is 1.1 (which is not good enough for ParaView)
- test by starting ParaView  
 ![image](https://discourse.paraview.org/uploads/default/original/2X/d/dfbb588b639fd0dcefd6c4d17d9338a2ff3d6bd9.jpeg)
