Skip to content

Instantly share code, notes, and snippets.

@0d129
Created January 27, 2025 05:08
Show Gist options
  • Save 0d129/ccdebbe9d986eb0c0c1a1dfd1c4cff29 to your computer and use it in GitHub Desktop.
Save 0d129/ccdebbe9d986eb0c0c1a1dfd1c4cff29 to your computer and use it in GitHub Desktop.
enable vm gpu passthrouogh.ps1
``` powershell
$vm = "New Virtual Machine"
Add-VMGpuPartitionAdapter -VMName $vm
Set-VMGpuPartitionAdapter -VMName $vm -MinPartitionVRAM 80000000 -MaxPartitionVRAM 100000000 -OptimalPartitionVRAM 100000000 -MinPartitionEncode 80000000 -MaxPartitionEncode 100000000 -OptimalPartitionEncode 100000000 -MinPartitionDecode 80000000 -MaxPartitionDecode 100000000 -OptimalPartitionDecode 100000000 -MinPartitionCompute 80000000 -MaxPartitionCompute 100000000 -OptimalPartitionCompute 100000000
Set-VM -GuestControlledCacheTypes $true -VMName $vm
Set-VM -LowMemoryMappedIoSpace 1Gb -VMName $vm
Set-VM -HighMemoryMappedIoSpace 32GB -VMName $vm
```
disable vm gpu passthrouogh.ps1
``` powershell
$vm = "New Virtual Machine"
Get-VMGpuPartitionAdapter $vm
Remove-VMGpuPartitionAdapter -VMName $vm
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment