Skip to content

Instantly share code, notes, and snippets.

@0d129
Created January 27, 2025 05:08
Show Gist options
  • Select an option

  • Save 0d129/ccdebbe9d986eb0c0c1a1dfd1c4cff29 to your computer and use it in GitHub Desktop.

Select an option

Save 0d129/ccdebbe9d986eb0c0c1a1dfd1c4cff29 to your computer and use it in GitHub Desktop.

Revisions

  1. 0d129 created this gist Jan 27, 2025.
    19 changes: 19 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,19 @@
    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
    ```