Configure NVIDIA License Server On-Prem and Integrate with MCS Provisioned Persistent Catalog

Uddave Jajoo 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.

  1. NVIDIA vGPU License Server Deployment
  2. Pre-Requisites Open JDK installation
  3. NVIDIA License Server Installation
  4. Access License Server management Interface
  5. Creating license server on NVIDIA portal
  6. Creating VDI Master Image (NVIDIA Driver Installation and vGPU profile)
  7. VDA installation and Machine Catalog creation
  8. Configuring Virtual Machine to enable vGPU profiles
  1. Install OpenJDK JRE on the server as prerequisite component before installing vGPU License server component
  2. Download java-1.8.0-openjdk-1.8.0.252-2.b09.ojdkbuild.windows.x86_64.msi
OpenJDK Dialog
  1. Run the MSI installer and proceed with the installation wizard
  2. Click Next
  3. Click Next and Install
  4. Monitor the installation and click Finish
OpenJDK Setup
Open JDK Custom Setup
Installing OpenJDK
OpenJDK Install Complete
  1. 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”
System Properties Dialog
  1. 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. 
System Variables dialog
  1. 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.
Java home directory
Java home
  1. Verification:  
    • Change to the Java directory 
    • Type java.exe -version 

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

  1. Right click the setup file and select run as administrator to proceed with configuration of license server
Application Tools
  1. Open administrative command prompt and navigate to the setup folder and launch setup.exe
  2. When prompted select allow the file to launch, select Allow this file and click OK.
  3. Wait for the setup file to launch and navigate through the wizard.
  4. Click Next in the Introduction Tab
  5. Click Next for EULA
  6. Click Next for Accepting the Apache License
NVIDIA License Server Intro
NVIDIA Licens Agreement
NVIDIA Apache License Agreement
  1. Select the location as default and proceed further with installation, click Next.
  2. In the Choose Firewall Options dialog box, select the ports to be opened in the firewall.
  3. 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.
  4. Click Install and proceed further with the installation process.
NVIDIA Choose Install Folder
NVIDIA Choose Firewall Options
NVIDIA Pre Install Summary
  1. Wait for the License Server installation script to execute
  2. Click Done once installation is complete.
Executing NVIDIA License Server script
NVIDIA Install Complete
  1. In a web browser, visit the home page for license server management interface HTTP: http://localhost:8080/licserver
  2. 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.
NVIDIA Licensed Clients

The default credentials for the license server administrator account are as follows:
‣ admin
Admin@123

  1. 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
  2. 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/~
  3. Reboot the server
  4. 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
Edit System Variables
Admin C:
  1. 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
  2. Run status check on the license server
    nvidialsadmin -authorize admin Admin@123 -status
Check license server
Check license server version
  1. Login to NVIDIA Dashboard link to register the license server on portal
    https://nvid.nvidia.com/dashboard/#/dashboard
  2. Login with the Organization user credentials and create License Server
License Servers login
  1. On the NVIDIA Licensing Portal dashboard, click CREATE LICENSE SERVER.
  2. 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.
  3. 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
Create License Server
  1. Verify the License server details along with the available license displayed in portal
License Server verify
  1. Download the License File
Download license file
  1. Login to License server and upload the license file to the server.
  2. Navigate to Licensed Feature Usage
    Verify the details for the License added to the console.
License Management
Licensed feature user

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

  1. Create a new VM and install NVIDIA and VDA agent.
  2. In our case virtual machine was cloned from existing WIN10 Master image.
  3. Uninstall VDA from the image.
  4. Shutdown the machine
  5. Navigate to VMware vcenter, and locate the virtual machine.
  6. Click on Edit settings and add Shared PCI Device, Click Add and select the vGPU profile and click Reserve all Memory
  7. The New Shared PCI device with vGPU profile will show as configured
  8. Select Ok to complete the configuration
Edit Settings
  1. Power on the virtual machine and monitor through remote console.
  2. Login as administrator
  3. 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
  4. Locate the media for NVIDIA driver and copy to local C Drive
  5. Right click on the NVIDIA driver setup file and run as administrator
  6. Select Yes to allow the UAC
  7. Leave the extraction path as default and click OK.
Device Manager
NVIDIA Display Driver
NVIDIA Display Driver International
  1. In the installation wizard, select Agree and Continue and proceed further
  2. Installation options select, Custom (advanced), it would let you select components to install as needed.
  3. Click Next, in the next window, it will display the list of components which will be install on the image.
NVIDIA Software agreement
NVIDIA Graphics Driver Install Options
  1. Select the check box to Perform a Clean Installation and select Next.
NVIDIA Graphics Driver Custom Install Options
  1. Wait for the installation to complete and monitor the progress.
NVIDIA Install in Progress
  1. 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.
NVIDIA complete
  1. RDP to the virtual machine and verify the device manager configuration.
  2. Upon login to machine you may receive a prompt that NVIDIA license is not present. Ignore the alert for now.
  3. 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.
  4. It will show NVIDIA GRID M60-8Q adapter.’
  5. New Device NVDIA GRID V100D-8Q, it will show up as this in the display adapters
NVIDIA License Container
File menu
New Device
  1. Shutdown the virtual machine and remove the Shared PCI device added on the master image.
  2. Right click machine, edit settings
  3. Click on the x mark against the Shared PCI device
  4. It will show as device will be removed, click OK.
  5. 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.
Recent Task Pane
Customize
  1. RDP to the virtual machine, copy the media to C:\Support
  2. Run the AutoSelect.exe file
  3. It will detect the VDA to be installed in Single Session OS by default.
  4. Select the option for VDA in single session OS and click Next.
C:Support
  1. In the next screen select Create a Master MCS image, click Next.
  2. VDA will be selected by default, click Next.
CVAD Config
CVAD Core Components
  1. In the component screen, select the option, Citrix Supportability Tools, Citrix User profile manager and Citrix User profile manager_WMI Plugin. Click Next.
Citrix Supportability Tools
  1. In the controller’s Tab, select configure later and click Next.
  2. 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.
CVAD Features
  1. In the Firewall Tab, leave the default and click Next.
CVAD Firewall Tab
  1. In the Summary Tab, review the selected configuration and proceed with Install. Click Install.
CVAD Summary Tab
  1. Uncheck the box and click Next.
  2. Click Finish and Restart the machine, it will reboot.
  3. Login to the machine again to resume the VDA installation process.
CVAD Diagnostics
  1. RDP to the machine and run Citrix Optimizer against the respective windows OS version template.
  2. Shut down the master image and take snapshot for the virtual machine.
  3. Login to Citrix studio and create machine catalog using the snapshot taken in above step.
  4. Navigate to the Machine Catalog Tab and select create Machine catalog, in the wizard select Next.
  5. In the next screen select Single Session OS and click Next.
  6. Select the options as highlighted and click Next.
  7. 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.
Machine Catalog Setup
Stuido MCS
  1. Select the options as highlighted and click Next.
  2. In the Master Image, select the Snapshot created for the master image.
    Ex – NVIDATESTVM_SNAP
  3. Select the minimum functional level for this catalog as 2206 or newer.
  4. In the Network cards tab, keep the VLAN selected and change if needed.
MCS Desktop
  1. In the Virtual Machines page, select the number of virtual machine and allocate the memory:
    2 Machines with 32 GB RAM
MCS VMs
  1. Create the Active directory machine accounts for the Desktops
  2. Name the Machine Catalog with Description:
    TEST-MC-NVIDA-vGPU-Pool
  3. Monitor the Catalog creation process in studio and vcenter.
  1. Assign vGPU profiles as per the requirement
  2. Assign B series profile to the provisioned desktops for allocating Virtual PC
Manage License
NVIDIA Control Panel
  1. 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:

Leave a Reply