by Uddave Jajoo, CTA & Indianapolis CUGC Leader
In 2021, I was asked to migrate the vGPU enabled VMs from one platform to another as our customer was migrating from VMWare Horizon to Citrix XenDesktops. I did not have enough knowledge about NVIDIA and how the GPU processing work in highly intensive graphics processing applications.
I took help from community members and support teams (both Citrix and NVIDIA) and deployed the solution to provision NVIDIA vGPU-enabled Citrix VDIs on vSphere. This blog post was created 2 years ago but was not published that time. However, I am happy to publish it now to the community so that others could also benefit from it.
(See also: Configuring NVIDIA vGPU VMs in Azure with Citrix DaaS.)
Below are the overall configuration steps covering deployment of all the major infrastructure and other components.
- NVIDIA vGPU License Server Deployment
- Pre-Requisites Open JDK installation
- NVIDIA License Server Installation
- Access License Server management Interface
- Creating license server on NVIDIA portal
- Creating VDI Master Image (NVIDIA Driver Installation and vGPU profile)
- VDA installation and Machine Catalog creation
- Configuring Virtual Machine to enable vGPU profiles
NVIDIA vGPU License Server Deployment: Open JDK JRE Prerequisite
- Install OpenJDK JRE on the server as prerequisite component before installing vGPU License server component
- Download java-1.8.0-openjdk-1.8.0.252-2.b09.ojdkbuild.windows.x86_64.msi

- Run the MSI installer and proceed with the installation wizard
- Click Next
- Click Next and Install
- Monitor the installation and click Finish




- Configure system environment variable on the server pointing to jdk location.
- Edit the System Environment Variables.
- Add the location of the bin folder of the JDK installation to the PATH variable in System Variables.
- The following is a typical value for the PATH variable: C:\WINDOWS\system32;C:\WINDOWS;”C:\Program Files\Java\jdk-11\bin”

- Set JAVA_HOME:
- Under System Variables, click New.
- Enter the variable name as JAVA_HOME.
- Enter the variable value as the installation path of the JDK (without the bin sub-folder).
- Click OK.

- Configure the PATH environment to enable to run JAVA from a command prompt
- Select the System variables “Path”
- Click Edit
- Click on New
- Type “%JAVA_HOME%\bin”
- Click OK.
- And OK again to apply changes.


- Verification:
- Change to the Java directory
- Type java.exe -version

NVIDIA Legacy License Server Installation
Legacy License server is set to EOL by July 2023, hence NVIDIA offers two different methods for provisioning license server. (DLS) On Premise and Cloud(CLS). In this blog, I am going to cover how to setup a CLS based license server. Steps are very simple and described properly in the NVIDIA documentation as well.
License System User Guide – NVIDIA Docs – Converting Legacy NVIDIA vGPU Software License Servers to NLS License Servers
- Right click the setup file and select run as administrator to proceed with configuration of license server

- Open administrative command prompt and navigate to the setup folder and launch setup.exe
- When prompted select allow the file to launch, select Allow this file and click OK.
- Wait for the setup file to launch and navigate through the wizard.
- Click Next in the Introduction Tab
- Click Next for EULA
- Click Next for Accepting the Apache License



- Select the location as default and proceed further with installation, click Next.
- In the Choose Firewall Options dialog box, select the ports to be opened in the firewall.
- To enable remote clients to access licenses from the server and prevent remote access to the management interface, use the default setting, which sets ports as follows:
- ‣ Port 7070 is open to enable remote clients to access licenses from the server.
- ‣ Port 8080 is closed to ensure that the management interface is available only through a web browser running locally on the license server host.
- Click Install and proceed further with the installation process.



- Wait for the License Server installation script to execute
- Click Done once installation is complete.


Access License Server Management Interface
- In a web browser, visit the home page for license server management interface HTTP: http://localhost:8080/licserver
- If administrative security is enabled for the license server, log in to the license server.
- In the license server management interface, select Login.
- In the Login page that is displayed, enter your user name and password for logging in to the license server and click Authorize.

The default credentials for the license server administrator account are as follows:
‣ admin
Admin@123
- Record the license server’s MAC address, by launching the license server management console and navigating to configuration
MAC Address – 00-XX-XX-XX-XX-XX-00 Note to change the MAC address binding on vecneter level - Add Environment variable on the license server as below, this is needed to ensure the nvidialsadmin utility commands run perfectly fine.
Variable Name:- FLEXNETLS_BASEURL
Variable Value:- http://localhost:7070/api/1.0/instances/~ - Reboot the server
- Enable Administrative security for license server
Perform this task in a command shell on the license server host.
Set the property security.enabled to true.
nvidialsadmin -config -set security.enabled=true Updated the property:security.enabled with value:true successfully


- Authenticating with license server
To provide your password in the command, specify the credentials as follows:
nvidialsadmin -authorize username password
In any subsequent nvidialsadmin command, users must provide the required credentials for authenticating with the license server - Run status check on the license server
nvidialsadmin -authorize admin Admin@123 -status


Creating a License server on the NVIDIA Portal
- Login to NVIDIA Dashboard link to register the license server on portal
https://nvid.nvidia.com/dashboard/#/dashboard - Login with the Organization user credentials and create License Server

- On the NVIDIA Licensing Portal dashboard, click CREATE LICENSE SERVER.
- If you are adding a license server to an organization or virtual group for which a license server has already been created, click CREATE SERVER.
- Enter the details as below:
ServerName: TestNVIDIA
Description: License Server for NVIDIA vGPU
MAC Address: 00-XX-XX-XX-XX-XX-00
Select product – Virtual PC 2.0-10 Licenses
Click Add Click create license server

- Verify the License server details along with the available license displayed in portal

- Download the License File

- Login to License server and upload the license file to the server.
- Navigate to Licensed Feature Usage
Verify the details for the License added to the console.


Creating VDI Master Image (NVIDIA Driver Installation and vGPU profile)
For vGPU card installation on vSphere or hypervisor please refer to the links: https://blogs.vmware.com/apps/2018/09/using-gpus-with-virtual-machines-on-vsphere-part-3-installing-the-nvidia-grid-technology.html
https://virtualizationreview.com/articles/2015/05/29/how-to-install-an-nvidia-vgpu-in-esxi-hosts.aspx
- Create a new VM and install NVIDIA and VDA agent.
- In our case virtual machine was cloned from existing WIN10 Master image.
- Uninstall VDA from the image.
- Shutdown the machine
- Navigate to VMware vcenter, and locate the virtual machine.
- Click on Edit settings and add Shared PCI Device, Click Add and select the vGPU profile and click Reserve all Memory
- The New Shared PCI device with vGPU profile will show as configured
- Select Ok to complete the configuration

- Power on the virtual machine and monitor through remote console.
- Login as administrator
- Open Device Manager, it will show Microsoft Basic Display Adapter with exclamation mark, which is normal
Caution:
NVIDIA vGPU vSphere VIB version and NVIDIA driver for Windows version need to match - Locate the media for NVIDIA driver and copy to local C Drive
- Right click on the NVIDIA driver setup file and run as administrator
- Select Yes to allow the UAC
- Leave the extraction path as default and click OK.



- In the installation wizard, select Agree and Continue and proceed further
- Installation options select, Custom (advanced), it would let you select components to install as needed.
- Click Next, in the next window, it will display the list of components which will be install on the image.


- Select the check box to Perform a Clean Installation and select Next.

- Wait for the installation to complete and monitor the progress.

- Select restart now on successful installation of NVIDIA Driver.
After restarting, the mouse cursor may not track properly using VNC or vSphere console. If so, use Remote Desktop.

- RDP to the virtual machine and verify the device manager configuration.
- Upon login to machine you may receive a prompt that NVIDIA license is not present. Ignore the alert for now.
- In order to validate the successful installation of the graphics drivers as well as the vGPU device, open Windows Device Manager and expand the Display Adapter section.
- It will show NVIDIA GRID M60-8Q adapter.’
- New Device NVDIA GRID V100D-8Q, it will show up as this in the display adapters


- Shutdown the virtual machine and remove the Shared PCI device added on the master image.
- Right click machine, edit settings
- Click on the x mark against the Shared PCI device
- It will show as device will be removed, click OK.
- The recent Task Pane will display the status of completion once the device will be removed. A XenDesktop machine catalog can be safely configured now.


VDA installation and Machine Catalog creation
- RDP to the virtual machine, copy the media to C:\Support
- Run the AutoSelect.exe file
- It will detect the VDA to be installed in Single Session OS by default.
- Select the option for VDA in single session OS and click Next.

- In the next screen select Create a Master MCS image, click Next.
- VDA will be selected by default, click Next.


- In the component screen, select the option, Citrix Supportability Tools, Citrix User profile manager and Citrix User profile manager_WMI Plugin. Click Next.

- In the controller’s Tab, select configure later and click Next.
- In the Features Tab, select the options- Optimize Performance, use windows Remote Assistance, Enable Real Time Audio Transport for audio and MCS IO, click Next.

- In the Firewall Tab, leave the default and click Next.

- In the Summary Tab, review the selected configuration and proceed with Install. Click Install.

- Uncheck the box and click Next.
- Click Finish and Restart the machine, it will reboot.
- Login to the machine again to resume the VDA installation process.


- RDP to the machine and run Citrix Optimizer against the respective windows OS version template.
- Shut down the master image and take snapshot for the virtual machine.
- Login to Citrix studio and create machine catalog using the snapshot taken in above step.
- Navigate to the Machine Catalog Tab and select create Machine catalog, in the wizard select Next.
- In the next screen select Single Session OS and click Next.
- Select the options as highlighted and click Next.
- Check the option for Machines that are Power Managed
Check Citrix MCS and select the resources corresponding to Cluster (ESXi Grid Server, where vGPU Cards and driver was configured) and click Next.


- Select the options as highlighted and click Next.
- In the Master Image, select the Snapshot created for the master image.
Ex – NVIDATESTVM_SNAP - Select the minimum functional level for this catalog as 2206 or newer.
- In the Network cards tab, keep the VLAN selected and change if needed.

- In the Virtual Machines page, select the number of virtual machine and allocate the memory:
2 Machines with 32 GB RAM

- Create the Active directory machine accounts for the Desktops
- Name the Machine Catalog with Description:
TEST-MC-NVIDA-vGPU-Pool - Monitor the Catalog creation process in studio and vcenter.
Configuring Virtual Machine to enable vGPU profiles
- Assign vGPU profiles as per the requirement
- Assign B series profile to the provisioned desktops for allocating Virtual PC


- Assign a series profile to the provisioned desktops for allocating virtual Apps.
Reference:
License System User Guide – NVIDIA Docs – Converting Legacy NVIDIA vGPU Software License Servers to NLS License Servers
https://blogs.vmware.com/apps/2018/09/using-gpus-with-virtual-machines-on-vsphere-part-3-installing-the-nvidia-grid-technology.html
https://virtualizationreview.com/articles/2015/05/29/how-to-install-an-nvidia-vgpu-in-esxi-hosts.aspx
License System User Guide – NVIDIA Docs
Legacy License server is set to EOL by July 2023
See More Recent Posts: