If you create vGPU-accelerated instances, you must install NVIDIA GRID drivers on the instances. If NVIDIA GRID licenses are not activated for the GPUs that are used by GPU-accelerated instances, GPU-related features may not take effect on the instances. In this case, you must obtain and activate the GRID licenses. This topic describes how to install a GRID driver on a Linux vGPU-accelerated instance and activate the GRID license for the instance. This topic also describes how to test the acceleration effect on graphics. A vGPU-accelerated instance that belongs to the vgn6i or vgn5i instance family and runs Ubuntu 16.04 64-bit is used in the example.

Prerequisites

  • A vGPU-accelerated instance that belongs to the vgn6i or vgn5i instance family and can access the Internet is created. When you create the instance, we recommend that you click Public Image to use a public image.
    Note This topic describes how to install a GRID driver on a Linux vGPU-accelerated instance. If you use a Windows vGPU-accelerated instance, you can select an image that contains a pre-installed GRID driver and use the image to create the instance.
  • A remote connection tool such as VNC Viewer is installed on your computer.
  • The GRID license and the installation package for the GRID driver are obtained. To obtain the license and the package, submit a ticket.
    Note The version of the GRID driver must match the specifications of your vGPU-accelerated instance and the region in which the instance resides. Therefore, you must specify the specifications and the region in the ticket that you submit.

Background information

This topic describes how to install a GRID driver on a Linux vGPU-accelerated instance. If you use a Linux GPU-accelerated compute-optimized instance, we recommend that you install a GPU driver on the instance. For more information, see Install a GPU driver on a Linux GPU-accelerated compute-optimized instance.

Install a GRID driver

  1. Disable Nouveau.
    Nouveau is an open source driver that is pre-installed in specific Linux distributions. If Nouveau is installed in the Linux distribution that you use, you must disable the driver before you install another driver.
    1. Connect to the vGPU-accelerated instance.
      Use one of the following methods to connect to the instance.
      Connection method References
      Workbench Connect to a Linux instance by using a password or key
      Virtual Network Computing (VNC) Connect to a Linux instance by using a password
    2. Check whether the blacklist-nouveau.conf file exists.
      ls /etc/modprobe.d/blacklist-nouveau.conf
      If the file does not exist, run the following command to create the file:
      vim /etc/modprobe.d/blacklist-nouveau.conf
    3. Add the following information to the blacklist-nouveau.conf file to disable Nouveau:
      Note If the following information is added to the file, skip this step.
      blacklist nouveau
      blacklist lbm-nouveau
      options nouveau modeset=0
    4. Create kernel initramfs.
      Note If you encounter issues such as an installation failure when you run the following commands, submit a ticket to contact technical support.
      rmmod nouveau
      update-initramfs -u
    5. Reboot the instance.
      reboot
  2. Install the obtained GRID driver on the instance.
    • vgn5i
      chmod +x NVIDIA-Linux-x86_64-418.226.00-grid.run
      ./NVIDIA-Linux-x86_64-418.226.00-grid.run
    • vgn6i
      chmod +x NVIDIA-Linux-x86_64-430.63-grid.run
      ./NVIDIA-Linux-x86_64-430.63-grid.run
    • vgn6i-vws or vgn7i-vws
      chmod +x NVIDIA-Linux-x86_64-460.91.03-grid.run
      ./NVIDIA-Linux-x86_64-460.91.03-grid.run
  3. Test whether the GRID driver is installed.
    nvidia-smi
    If the returned information is similar to the following command output, the GRID driver is installed. In the returned information, Driver Version indicates the version of the GRID driver, and CUDA Version indicates the latest CUDA version supported by the GRID driver version. The following table lists specific GRID driver versions and the latest CUDA versions supported by these driver versions.
    GRID driver version Latest CUDA version supported
    430.99 10.1
    460.91.03 11.2
    470.82.01 11.4
  4. Add a license server.
    1. Go to the /etc/nvidia directory.
      cd /etc/nvidia
    2. Create a file named gridd.conf.
      cp gridd.conf.template gridd.conf
    3. Add the following information about the license server to the gridd.conf file:
      ServerAddress=<IP address of the license server>
      ServerPort=<Port of the license server. Default value: 7070.)>
      FeatureType=1
  5. Reboot the instance for the configurations of the license server to take effect.
    reboot
  6. Check whether the license is activated.
    1. Connect to the instance.
    2. Check the status of the license.
      systemctl status nvidia-gridd
      If License acquired successfully is contained in the command output, the license is activated.

Test the acceleration effect on graphics

The following section describes how to test the acceleration effect on graphics for the GRID driver that is installed in an OpenGL Extension to the X Window System (GLX) application on a vGPU-accelerated instance. A vGPU-accelerated instance that runs Ubuntu 16.04 64-bit is used as an example.

  1. Prepare an environment that is used to test the acceleration effect on graphics.
    1. Run the following command to install x11vnc:
      apt-get install x11vnc
    2. Run the lspci | grep NVIDIA command to obtain the value of the BusID parameter for the GPU that is used by the instance.

      In this example, the value of the BusID parameter is 00:07.0.

    3. Configure the X Server environment and reboot the system.
      1. Run the nvidia-xconfig --enable-all-gpus --separate-x-screens command.
      2. Add the obtained value of the BusID parameter to Section "Device" in the /etc/X11/xorg.conf file. In this example, BusID "PCI:0:7:0" is added.
      3. Run the reboot command to reboot the system.
  2. Run the following command to install the GLX application:
    apt-get install mesa-utils                    
  3. Run the startx command to start X Server.
    • If the startx command cannot take effect, run the apt-get install xinit command to install xinit.
    • When you run the startx command, the hostname: Name or service not known error message may be prompted. The error message does not affect the startup of X Server. You can run the hostname command to obtain the hostname of your instance. Then, you can modify the /etc/hosts file by replacing the value of the hostname parameter that follows 127.0.0.1 with the hostname of the instance.
  4. Start an SSH session on a client and run the following command to start x11vnc:
    x11vnc -display :1
    If the returned information is similar to the following command output, x11vnc is started. In this case, you can connect to the instance by using a VNC application, such as VNC Viewer.
  5. Log on to the ECS console and configure a rule for a security group to which the instance belongs. The rule allows inbound traffic on TCP port 5900. For more information, see Add a security group rule.
  6. On your computer, start the VNC application such as VNC Viewer, enter <Public IP address of the instance>:5900 to connect to the instance, and then go to a K Desktop Environment (KDE) desktop.
  7. Run the glxinfo command to view the configurations that are supported by the GRID driver.
    1. Start another SSH session on a client.
    2. Run the export DISPLAY=:1 command.
    3. Run the glxinfo -t command to obtain the configurations that are supported by the GRID driver.
  8. Run the glxgears command to test the GRID driver.
    1. On the KDE desktop, right-click the desktop and select Run Command.
    2. Run the glxgears command to start the GLX application.
      If a window that is similar to the following figure appears, the GRID driver works as expected.