Connect your physical graphics card to Hyper-V in Windows 11 or 10

It is not surprising that many graphics APIs do not work in virtualization systems like VMware, VirtualBox, or Hyper-V because they emulate a poor video card to save hardware resources. This limitation is the reason why certain effects, such as window rounding, may be unavailable when using Windows 11 on a virtual machine.

These restrictions are primarily driven by the policies of video card manufacturers and virtualization system developers. NVidia, for example, recommends using specialized GRID K1 and K2 video cards for graphics computing virtualization, which are significantly more expensive than regular video cards. If NVidia were to enable the use of inexpensive video cards for virtual machines, it would potentially impact the demand for high-end ones.

Nevertheless, there are still options available. Hyper-V supports the forwarding of discrete graphics cards, unlike VMware and VirtualBox, although there are some limitations. In previous versions of Windows 10, RemoteFX technology was used for this purpose. However, in current builds of Windows 10 and Windows 11, RemoteFX is no longer functional, and third-party tools must be utilized to leverage the resources of a physical video card.

It is important to note that the solution presented below comes with certain limitations.

  • This Hyper-V method requires Windows 10 20H1 and above.
  • You must be using a second-gen virtual machine, its first generation is not supported.
  • After the graphics card forwarding, conflicts are possible during the parallel operation of the VM and WSL.
  • The checkpointing feature for the virtual machine will be disabled.

If the above conditions suit your case, follow the further instructions.

Forwarding physical graphics card to Hyper-V

  1. Make sure that the video card can be connected to Hyper-V , for which run PowerShell as an administrator and run the Get-VMPartitionableGpu (for Windows 10) or Get-VMHostPartitionableGpu (for Windows 11) command. You should see a list of video adapters and their properties.

    list video cards in powershell
    A list of video cards in PowerShell

  2. Download the archive with ready-made video card connection scripts from the developer page on GitHub. Here’s the direct link. Unzip it to a convenient location.
  3. Shut down your virtual machine if you have it running.
  4. Return to your PowerShell, and run these commands:
    • Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
    • Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
  5. Use the cd command to change the folder to the one with the unzipped GitHub scripts. From there, run the Update-VMGpuPartitionDriver.ps1 -VMName "Your VM Name" -GPUName "AUTO" command. You need to replace “Your VM Name” with the name of your virtual machine.

    Forwarding physical graphics card to Hyper V
    Forwarding physical graphics card to Hyper V

If the command is executed successfully, you will observe graphic improvements, such as previously unavailable transparency effects in the virtual operating system.

Limitations of Graphics Card Forwarding

Do not assume that successfully forwarding a video card in Hyper-V will grant the virtual system full access to all graphics capabilities. Many of these capabilities will still remain unavailable, including graphics control panel tools (such as NVIDIA or AMD), GPU load statistics in Task Manager, and programs and functions that rely on Vulkan and other popular graphics APIs.

Looks like you've read the post to the end. If you enjoyed it, please share it. You would greatly help our blog to grow!

Author: The MFTNEXT Team

The MSFTNEXT project is a small team of authors who love to engage with the latest technology and gadgets. Being passionate Windows bloggers, we are happy to help others fix their system issues.

Leave a Reply

Your email address will not be published.

css.php