VMware Horizon vGPU Virtual Machine Config

You have an NVIDIA GPU installed in your server and the NVIDIA licensing server configured, now you need to prep your virtual desktops to utilize the GPU. I’ll cover the basic steps here, but more information can be found on Tech Zone.

Be sure that you have a way to remote into the virtual machine other than using the vSphere console. After installing the NVIDIA drivers we won’t be able to use the vSphere console so having RDP or another tool available will be critical to complete the configuration.

Virtual Machine Settings

The VM that I’m prepping will be used for a Horizon Instant Clone desktop pool, but the process is similar for full-clone virtual machines as well.

Be sure your VM is at least hardware version 11. It can be helpful to reference the release notes for the various versions in case you are looking for a feature that was added.

Have your VM powered off to perform these steps.

The first setting we need to change is to reserve the memory. Right-click on the VM and select Edit Settings.

Under Virtual Hardware expand the Memory section. Next to Reserve all guest memory select the checkbox.

Next, from the same Virtual Hardware tab in the settings select Add New Device (A) > PCI Device (B).

Under the New PCI device, you should see the NVIDIA GRID vGPU is already selected. Below that you can select the NVIDIA vGPU Profile you wish to use with the virtual machine(s). Additional info on picking a profile can be found here. When you’re done click OK.

Go ahead and power the VM on. Then launch a remote session to it and log in with an administrator account.

Locate the drivers. You should have already downloaded them when you grabbed the NVIDIA GRID vSphere package from the NVIDIA Licensing Portal. You can see how to do that here. They should have a name similar to what you see below with “grid_Win10_win11….etc”

After launching the installation a prompt will require you to click OK to start the installation.

On the License Agreement screen click Agree and Continue.

I selected Custom installation, but only to show the various features in the next step. Custom allows you to disable one or more of the components that get installed. Otherwise, leave it to Express and it will install 3 components. Click Next when you’ve made your selection.

If you chose Custom then review the components for what you need. In most cases, you will just want to have all of the available components installed. I’m leaving them all selected. Then click Next.

The installation should then begin. In my lab, it took approximately 2 minutes to complete.

Finally, reboot the OS to complete the installation.

At this point, you will need to connect back in using something other than the vSphere Console. If by mistake you did not enable RDP or plan for this you can temporarily remove the PCI device from the VM. Log in and set up RDP or another solution to remote in. Then add back the PCI device.

Post GRID Driver Configuration

With the NVIDIA GRID drivers installed, we can validate that the GPU is showing up within the guest OS. Simply check the device manager and we should see a happy GPU, such as my T4 card below.

The last configuration step is adding the client configuration token to our base image. From the guest OS navigate to %SystemDrive%:\Program Files\NVIDIA Corporation \vGPU Licensing\ClientConfigToken folder. Copy the token (.tok) downloaded from your NVIDIA Licensing Portal to this location.

Since I’ll be cloning this VM to a Horizon desktop pool I’m not restarting the services. The cloning process should take care of that for me. If you wanted to test you could reboot the VM.

The VM should be all set now. You can take a snapshot and build a Horizon desktop pool to test with. Keep in mind the number of VMs you place in the desktop pool can’t exceed the resources of the GPU. If for example you have a physical GPU with a 16 GB framebuffer and you assign a 2 GB profile to your VMs then you can only build 8 VMs (16/2=8).

I hope this was helpful. Thank you for reading!

Leave a Reply

Your email address will not be published. Required fields are marked *