How to Set up "TRUE" Virtual GPU in VERDE

How to Set up "TRUE" Virtual GPU in VERDE

Product Line:  VERDE

This document is designed to assist the engineer in installing "TRUE" vGPU in VERDE.  


It needs to be said, this requires a very high-end vGPU card.  For example:  Nvidia
The high-end card allows VERDE configuration scenarios such as all vGPU users using one and the same gold image and each has their own Session Settings or conversely, each user having their own gold image, but sharing the same Session Setting.  A little Graphic Representation:



1.  Install the Centos 7 and VERDE (rpm) on the target server:  the server that will host the Nvidia card. 

After the VERDE VDI RPM installation, please do the following:

  1. Unzip the attached “vgup.zip” to a tmp folder (click on ATTACHMENTS at the bottom of this article)
  2. Go to the /tmp directory
  3. Execute ./ApplyPatch.sh

The ApplyPatch.sh script will backup the existing win4-runtime file and replace with a new win4-runtime file.  This win4-runtime file is need to enable the vgpu functionality.    This patched win4-runtime will enable the vGPU created in the hypervisor (KVM) and assign to gold images via session settings.


2.  Install the required Nvidia drivers.
3.  This higher level of equipment requires a GPU licensing.  This can be installed on a separate server:  A License Server



                           Passthrough Configuration
Instructions:
Run
1,  yum -y install pcituils
In the terminal perform next command “lspci -nn | grep VGA“ or  by vendor ID “lspci -nn | grep 10de” to get list of the VGA devices. And form the list of the devices that will be pass through into the virtual image. For example, based on the screen bellow for the NVIDIA GRID card we have 4 vGPU with the vendor and device ids [10de:0ff2]

           



Once the hardware is in place and VERDE is up and running, you can start working on your gold image.

                                                            GOLD IMAGE     

1.  Create a gold image as you normally would do.  No need to address the GPU at this time.
2.  Install the VERDE tools.
3.  Install the appropriate GPU drivers ***IMPORTANT***
4.  Install the desired applications
5.  Run the Windows Updates
6.  Disable the Windows Update service
7. Check in and publish the gold image

                                    Nvidia vGPU on RedHat KVM

The following is a link to the users guide entitled "Creating an NVIDIA vGPU on RedHat Enterprise Linux KVM":
2. IMPORTANT:  Once the following configurations have been implemented, do not reboot the VERDE server; the created vGPU configuration is not    persistence. You will need re-create/re-implement the settings a after server reboot.  This will be addressed/resolved in future releases.
3. Access the VERDE server via ssh with the root user.
4. Go to the directory where the UUID's for the GPU are stored (cd /sys/bus/mdev/devices)  Perform the command ls -l   You should see something similar to the following screen shot:



5.  The light blue character strings in the screen shot are the individual GPU's UUIDs.  These are VERDE IMPORTANT.  Record these numbers!!

                              Associate vGPU with a VERDE Session Setting

1. Create a regular Session Setting (don't worry about vGPU.. no slots)
2. Create a Desktop Policy assigning it to a single user.
3. Have user launch session with SPICE protocol
4. Shutdown the session
5. The purpose:  You have just generate the settings.local.policy
6. Collect the Policy Unique Identifier (PUID) from the newly created settings.local.policy
          #  cat /home/vb-verde/verde-orgs/org-0/users/0local/<UserID>/<ImageName>/settings.local.policy


7. Find the Session Settings PUID file 
           # ls /home/vb-verde/.verde/



8. Access/Edit the settings.PUID file:
          #  vi /home/vb-verde/.verde/settings.4540415f-30b8-4698-9e98-15a2f3b647ac
9. Append the vGPU UUID to the settings.PUID file ... as:  WIN4_VIDEO_PASSTHROUGH_ID=UUID as follows:


10. Launch your image with the designated user with either SPICE or RDP protocol.
11.  Check the guest image's Device Manager to ensure the GPU is recognized

One Down!


                                                                  Add Other vGPUs

There are two methods to add additional vGPUs,  The PUID is associated with the gold Image + Session Setting combination.

1. Create new gold images and use the same Session Setting.  Create a Copy of the gold image.
2. Use the same gold image with different Session Settings.  Just create a new session setting with a different name.

Which ever you choose, a unique PUID is generated.  (/home/vb-verde/.verde/settings.4540415f-30b8-4698-9e98-15a2f3b647ac)
Record the vGPU UUID you're going to use and go back to:  Associate vGPU with a VERDE Session Setting

                                                      Some Useful Information

The following command lists the created VGPU UUID
#ls -l /sys/bus/mdev/devices



The following command lists who each vGPU belongs to.  The asterisk '*' is the numerical designation/slot of the vGPU. 
#ls -ltr /dev/vfio/*



This is where the owner and group needs to be  changed.

#chgrp vb-verde /dev/vfio/0
#chown vb-verde /dev/vfio/0
    • Related Articles

    • Additional Explanation Regarding vGPU vs. GPU

      Product Line:  VERDE There are two main types of GPU cards: Those that support virtual GPU and those that do not. For the virtual GPU cards - the ones that we have tested with VERDE: There is a single physical GPU card that is plugged in to the ...
    • Configuring your VERDE 8.2.2+ (RPM) Server to Support vGPU

      Product Line:  VERDE Instruction to configure VERDE server to be able use the vGPU functional. Upfront, many will ask, what GPU cards are compatible with VERDE.  Here's the official statement: "We don't have a list of supported GPU cards...that would ...
    • Additional Information From the Engineers About Using GPU

      Product Line:  VERDE Here's a bit more information from QA and the Engineers regarding GPU: From QA: The GPU model that we have is NVIDIA Tesla M60 https://www.amazon.com/NVIDIA-Accelerator-Processing-HP-803273-001/dp/B01FL56SZY   Please see below ...
    • Configuration Tips for GPU/vGPU

      Product Line:  VERDE QA had some issues testing GPU. They got one session to work but they had issues getting multiple concurrent sessions working. We think it's because they have things configured incorrectly. The Engineering QA had no such problem. ...
    • Discussion Regarding AutoCad with GPU. Specifically Sizing

      Produce Line:  VERDE Following is a discussion regarding how to size (RAM, Storage) when using AutoCad and VERDE's GPU. So It is very important that adequate testing of AutoCad is performed in Verde to ensure that the correct amount of RAM and ...