Autoriser le partage vGPU pour Bac à sable Windows
Allow vGPU sharing for Windows Sandbox
Explication
Ce paramètre de stratégie consiste à activer ou désactiver le GPU virtualisé.
Si vous activez ce paramètre de stratégie, vGPU sera pris en charge dans Bac à sable Windows.
Si vous désactivez ce paramètre de stratégie, Bac à sable Windows utilisera le rendu logiciel, qui peut être plus lent que le GPU virtualisé.
Si vous ne configurez pas ce paramètre de stratégie, vGPU sera activé.
Notez que l'activation du GPU virtualisé peut potentiellement augmenter la surface d'attaque du bac à sable.
This policy setting is to enable or disable the virtualized GPU.
If you enable this policy setting, vGPU will be supported in the Windows Sandbox.
If you disable this policy setting, Windows Sandbox will use software rendering, which can be slower than virtualized GPU.
If you do not configure this policy setting, vGPU will be enabled.
Note that enabling virtualized GPU can potentially increase the attack surface of the sandbox.
Registre
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Sandbox- Nom de la valeur
AllowVGPU
| État | Valeur écrite |
|---|---|
| Activé | REG_DWORD = 1 |
| Désactivé | REG_DWORD = 0 |
PowerShell
Commandes PowerShell qui écrivent dans le registre ce que la stratégie écrirait. Les valeurs entre chevrons (<…>) sont à remplacer.
Écrire directement dans le registre contourne la stratégie de groupe : si une GPO gère cette valeur, elle sera réécrite au prochain gpupdate ; sinon la valeur reste en place (effet « tatouage »). Préférez une GPO ou, en local, LGPO.exe. Exécutez PowerShell en administrateur pour HKLM. Certaines stratégies demandent un redémarrage ou gpupdate /force.
Activer
# Activer : WindowsSandbox/AllowVGPU
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\Sandbox'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'AllowVGPU' -Value 1 -Type DWordDésactiver
# Désactiver : WindowsSandbox/AllowVGPU
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\Sandbox'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'AllowVGPU' -Value 0 -Type DWordRevenir à « Non configuré »
# Revenir à « Non configuré » : WindowsSandbox/AllowVGPU
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\Sandbox'
Remove-ItemProperty -Path $k -Name 'AllowVGPU' -ErrorAction SilentlyContinue