How to configure vGPU license on the Linux host for KVM passthrough

Hi,

I have obtained a trial license for NVIDIA AI Enterprise, configured the cloud license server, and downloaded the token.

I have installed the nvidia-vgpu-ubuntu-aie-580_580.82.02_amd64.deb driver on the Linux host.

Then, I am following the client licensing guide to configure the license on the host machine. I have noticed that there is no /etc/nvidia folder. However, I have created it, created /etc/nvidia/gridd.conf and copied the token to /etc/nvidia/ClientConfigToken folder with proper permissions. I do not have nvidia-gridd service, so I restarted the nvidia-vgpu-mgr.service service.

License information is not populated. How to configure the license for vGPU on the host machine?

user@hcg-srv-cn002:~/virtual-gpu-manager-7_v7.1$ nvidia-smi -q -i 0

==============NVSMI LOG==============

Timestamp                                 : Sat Oct 18 01:13:47 2025
Driver Version                            : 580.82.02
CUDA Version                              : Not Found
vGPU Driver Capability
        Heterogenous Multi-vGPU           : Supported

Attached GPUs                             : 8
GPU 00000000:19:00.0
    Product Name                          : NVIDIA H200
    Product Brand                         : NVIDIA
    Product Architecture                  : Hopper
    Display Mode                          : Requested functionality has been deprecated
    Display Attached                      : Yes
    Display Active                        : Disabled
    Persistence Mode                      : Enabled
    Addressing Mode                       : N/A
    vGPU Device Capability
        Fractional Multi-vGPU             : Supported
        Heterogeneous Time-Slice Profiles : Supported
        Heterogeneous Time-Slice Sizes    : Supported
        Homogeneous Placements            : Supported
        MIG Time-Slicing                  : Not Supported
        MIG Time-Slicing Mode             : Disabled
    MIG Mode
        Current                           : Disabled
        Pending                           : Disabled
    Accounting Mode                       : Enabled
    Accounting Mode Buffer Size           : 4000
    Driver Model
        Current                           : N/A
        Pending                           : N/A
    Serial Number                         : 1754324048185
    GPU UUID                              : GPU-e96646ea-b71e-b205-3792-441478561263
    GPU PDI                               : 0x418fb9ff076c951c
    Minor Number                          : 0
    VBIOS Version                         : 96.00.A5.00.03
    MultiGPU Board                        : No
    Board ID                              : 0x1900
    Board Part Number                     : 695-2G520-0280-001
    GPU Part Number                       : 2335-895-A1
    FRU Part Number                       : N/A
    Platform Info
        Chassis Serial Number             : N/A
        Slot Number                       : N/A
        Tray Index                        : N/A
        Host ID                           : N/A
        Peer Type                         : N/A
        Module Id                         : 2
        GPU Fabric GUID                   : N/A
    Inforom Version
        Image Version                     : G520.0280.02.02
        OEM Object                        : 2.1
        ECC Object                        : 7.16
        Power Management Object           : N/A
    Inforom BBX Object Flush
        Latest Timestamp                  : N/A
        Latest Duration                   : N/A
    GPU Operation Mode
        Current                           : N/A
        Pending                           : N/A
    GPU C2C Mode                          : Disabled
    GPU Virtualization Mode
        Virtualization Mode               : Host VGPU
        Host VGPU Mode                    : SR-IOV
        vGPU Heterogeneous Mode           : Disabled
    GPU Recovery Action                   : None
    GSP Firmware Version                  : 580.82.02
    IBMNPU
        Relaxed Ordering Mode             : N/A
    PCI
        Bus                               : 0x19
        Device                            : 0x00
        Domain                            : 0x0000
        Base Classcode                    : 0x3
        Sub Classcode                     : 0x2
        Device Id                         : 0x233510DE
        Bus Id                            : 00000000:19:00.0
        Sub System Id                     : 0x18BE10DE
        GPU Link Info
            PCIe Generation
                Max                       : 5
                Current                   : 5
                Device Current            : 5
                Device Max                : 5
                Host Max                  : N/A
            Link Width
                Max                       : 16x
                Current                   : 16x
        Bridge Chip
            Type                          : N/A
            Firmware                      : N/A
        Replays Since Reset               : 0
        Replay Number Rollovers           : 0
        Tx Throughput                     : 639 KB/s
        Rx Throughput                     : 659 KB/s
        Atomic Caps Outbound              : FETCHADD_32 FETCHADD_64 SWAP_32 SWAP_64 CAS_32 CAS_64 
        Atomic Caps Inbound               : N/A
    Fan Speed                             : N/A
    Performance State                     : P0
    Clocks Event Reasons
        Idle                              : Active
        Applications Clocks Setting       : Not Active
        SW Power Cap                      : Not Active
        HW Slowdown                       : Not Active
            HW Thermal Slowdown           : Not Active
            HW Power Brake Slowdown       : Not Active
        Sync Boost                        : Not Active
        SW Thermal Slowdown               : Not Active
        Display Clock Setting             : Not Active
    Clocks Event Reasons Counters
        SW Power Capping                  : 0 us
        Sync Boost                        : 0 us
        SW Thermal Slowdown               : 0 us
        HW Thermal Slowdown               : 0 us
        HW Power Braking                  : 0 us
    Sparse Operation Mode                 : Disabled
    FB Memory Usage
        Total                             : 143771 MiB
        Reserved                          : 1174 MiB
        Used                              : 0 MiB
        Free                              : 142598 MiB
    BAR1 Memory Usage
        Total                             : 262144 MiB
        Used                              : 1 MiB
        Free                              : 262143 MiB
    Conf Compute Protected Memory Usage
        Total                             : 0 MiB
        Used                              : 0 MiB
        Free                              : 0 MiB
    Compute Mode                          : Default
    Utilization
        GPU                               : 0 %
        Memory                            : 0 %
        Encoder                           : 0 %
        Decoder                           : 0 %
        JPEG                              : 0 %
        OFA                               : 0 %
    Encoder Stats
        Active Sessions                   : 0
        Average FPS                       : 0
        Average Latency                   : 0
    FBC Stats
        Active Sessions                   : 0
        Average FPS                       : 0
        Average Latency                   : 0
    DRAM Encryption Mode
        Current                           : N/A
        Pending                           : N/A
    ECC Mode
        Current                           : Enabled
        Pending                           : Enabled
    ECC Errors
        Volatile
            SRAM Correctable              : 0
            SRAM Uncorrectable Parity     : 0
            SRAM Uncorrectable SEC-DED    : 0
            DRAM Correctable              : 0
            DRAM Uncorrectable            : 0
        Aggregate
            SRAM Correctable              : 0
            SRAM Uncorrectable Parity     : 0
            SRAM Uncorrectable SEC-DED    : 0
            DRAM Correctable              : 0
            DRAM Uncorrectable            : 0
            SRAM Threshold Exceeded       : No
        Aggregate Uncorrectable SRAM Sources
            SRAM L2                       : 0
            SRAM SM                       : 0
            SRAM Microcontroller          : 0
            SRAM PCIE                     : 0
            SRAM Other                    : 0
        Channel Repair Pending            : No
        TPC Repair Pending                : No
    Retired Pages
        Single Bit ECC                    : N/A
        Double Bit ECC                    : N/A
        Pending Page Blacklist            : N/A
    Remapped Rows
        Correctable Error                 : 0
        Uncorrectable Error               : 0
        Pending                           : No
        Remapping Failure Occurred        : No
        Bank Remap Availability Histogram
            Max                           : 3072 bank(s)
            High                          : 0 bank(s)
            Partial                       : 0 bank(s)
            Low                           : 0 bank(s)
            None                          : 0 bank(s)
    Temperature
        GPU Current Temp                  : 27 C
        GPU T.Limit Temp                  : 60 C
        GPU Shutdown T.Limit Temp         : -8 C
        GPU Slowdown T.Limit Temp         : -2 C
        GPU Max Operating T.Limit Temp    : 0 C
        GPU Target Temperature            : N/A
        Memory Current Temp               : 28 C
        Memory Max Operating T.Limit Temp : 0 C
    GPU Power Readings
        Average Power Draw                : 81.96 W
        Instantaneous Power Draw          : 82.21 W
        Current Power Limit               : 700.00 W
        Requested Power Limit             : 700.00 W
        Default Power Limit               : 700.00 W
        Min Power Limit                   : 200.00 W
        Max Power Limit                   : 700.00 W
    GPU Memory Power Readings 
        Average Power Draw                : 41.11 W
        Instantaneous Power Draw          : N/A
    Module Power Readings
        Average Power Draw                : N/A
        Instantaneous Power Draw          : N/A
        Current Power Limit               : N/A
        Requested Power Limit             : N/A
        Default Power Limit               : N/A
        Min Power Limit                   : N/A
        Max Power Limit                   : N/A
    Power Smoothing                       : N/A
    Workload Power Profiles
        Requested Profiles                : N/A
        Enforced Profiles                 : N/A
    Clocks
        Graphics                          : 345 MHz
        SM                                : 345 MHz
        Memory                            : 3199 MHz
        Video                             : 765 MHz
    Applications Clocks
        Graphics                          : 1980 MHz
        Memory                            : 3201 MHz
    Default Applications Clocks
        Graphics                          : 1980 MHz
        Memory                            : 3201 MHz
    Deferred Clocks
        Memory                            : N/A
    Max Clocks
        Graphics                          : 1980 MHz
        SM                                : 1980 MHz
        Memory                            : 3201 MHz
        Video                             : 1545 MHz
    Max Customer Boost Clocks
        Graphics                          : 1980 MHz
    Clock Policy
        Auto Boost                        : N/A
        Auto Boost Default                : N/A
    Fabric
        State                             : Completed
        Status                            : Not Supported
        CliqueId                          : 0
        ClusterUUID                       : 00000000-0000-0000-0000-000000000000
        Health
            Summary                       : N/A
            Bandwidth                     : N/A
            Route Recovery in progress    : N/A
            Route Unhealthy               : N/A
            Access Timeout Recovery       : N/A
            Incorrect Configuration       : N/A
    Processes                             : None
    Capabilities
        EGM                               : disabled

You need to license the guest and not the host

1 Like

Thank you. So I don’t need to do anything on the host to get virtualization working with vGPU.

The reason I’ve run into a licensing problem is that I was trying to pass through the MIG slice into the VM. Is that possible?

Since it is not achievable with conventional vfio-pci passthrough, I was trying to create a vGPU and pass it through as an mdev device. I was following the Virtual GPU Software User Guide - NVIDIA Docs (tried both SR-IOV and legacy). However, the device is not listed under mdev_bus

/sys/class/mdev_bus/<bdf>

Specifically

user@hcg-srv-cn002:~$ sudo /usr/lib/nvidia/sriov-manage -e 0000:19:00.0
Enabling VFs on 0000:19:00.0

user@hcg-srv-cn002:~$ ls -l /sys/bus/pci/devices/0000:19:00.0/ | grep virtfn
lrwxrwxrwx 1 root root            0 Oct 18 03:43 virtfn0 -> ../0000:19:00.2
lrwxrwxrwx 1 root root            0 Oct 18 03:43 virtfn1 -> ../0000:19:00.3
lrwxrwxrwx 1 root root            0 Oct 18 03:43 virtfn10 -> ../0000:19:01.4
lrwxrwxrwx 1 root root            0 Oct 18 03:43 virtfn11 -> ../0000:19:01.5
lrwxrwxrwx 1 root root            0 Oct 18 03:43 virtfn12 -> ../0000:19:01.6
lrwxrwxrwx 1 root root            0 Oct 18 03:43 virtfn13 -> ../0000:19:01.7
lrwxrwxrwx 1 root root            0 Oct 18 03:43 virtfn14 -> ../0000:19:02.0
lrwxrwxrwx 1 root root            0 Oct 18 03:43 virtfn15 -> ../0000:19:02.1
lrwxrwxrwx 1 root root            0 Oct 18 03:43 virtfn16 -> ../0000:19:02.2
lrwxrwxrwx 1 root root            0 Oct 18 03:43 virtfn17 -> ../0000:19:02.3
lrwxrwxrwx 1 root root            0 Oct 18 03:43 virtfn18 -> ../0000:19:02.4
lrwxrwxrwx 1 root root            0 Oct 18 03:43 virtfn19 -> ../0000:19:02.5
lrwxrwxrwx 1 root root            0 Oct 18 03:43 virtfn2 -> ../0000:19:00.4
lrwxrwxrwx 1 root root            0 Oct 18 03:43 virtfn20 -> ../0000:19:02.6
lrwxrwxrwx 1 root root            0 Oct 18 03:43 virtfn21 -> ../0000:19:02.7
lrwxrwxrwx 1 root root            0 Oct 18 03:43 virtfn22 -> ../0000:19:03.0
lrwxrwxrwx 1 root root            0 Oct 18 03:43 virtfn23 -> ../0000:19:03.1
lrwxrwxrwx 1 root root            0 Oct 18 03:43 virtfn24 -> ../0000:19:03.2
lrwxrwxrwx 1 root root            0 Oct 18 03:43 virtfn25 -> ../0000:19:03.3
lrwxrwxrwx 1 root root            0 Oct 18 03:43 virtfn26 -> ../0000:19:03.4
lrwxrwxrwx 1 root root            0 Oct 18 03:43 virtfn27 -> ../0000:19:03.5
lrwxrwxrwx 1 root root            0 Oct 18 03:43 virtfn28 -> ../0000:19:03.6
lrwxrwxrwx 1 root root            0 Oct 18 03:43 virtfn29 -> ../0000:19:03.7
lrwxrwxrwx 1 root root            0 Oct 18 03:43 virtfn3 -> ../0000:19:00.5
lrwxrwxrwx 1 root root            0 Oct 18 03:43 virtfn30 -> ../0000:19:04.0
lrwxrwxrwx 1 root root            0 Oct 18 03:43 virtfn31 -> ../0000:19:04.1
lrwxrwxrwx 1 root root            0 Oct 18 03:43 virtfn4 -> ../0000:19:00.6
lrwxrwxrwx 1 root root            0 Oct 18 03:43 virtfn5 -> ../0000:19:00.7
lrwxrwxrwx 1 root root            0 Oct 18 03:43 virtfn6 -> ../0000:19:01.0
lrwxrwxrwx 1 root root            0 Oct 18 03:43 virtfn7 -> ../0000:19:01.1
lrwxrwxrwx 1 root root            0 Oct 18 03:43 virtfn8 -> ../0000:19:01.2
lrwxrwxrwx 1 root root            0 Oct 18 03:43 virtfn9 -> ../0000:19:01.3

user@hcg-srv-cn002:~$ ls -l /sys/class/mdev_bus/ | grep 0000:19:00
user@hcg-srv-cn002:~$ 

Correct, you can only use a MIG instance in a VM with vGPU.

1 Like

NVIDIA Enterprise support pointed me to this guide: Virtual GPU Software User Guide - NVIDIA Docs

Afterwards, I have created a VM using libvirt as usual, using the BDF corresponding to a virtual function configured in the previous step, like 0000:19.00.2

It worked. In guest:

riftuser@riftvm:~$ nvidia-smi
Tue Oct 21 20:42:34 2025
±----------------------------------------------------------------------------------------+
| NVIDIA-SMI 580.95.05              Driver Version: 580.95.05      CUDA Version: 13.0     |
±----------------------------------------±-----------------------±---------------------+
| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
|                                         |                        |               MIG M. |
|=========================================+========================+======================|
|   0  NVIDIA H200X-2-35C             On  |   00000000:01:00.0 Off |                   On |
| N/A   N/A    P0            N/A  /  N/A  |       1MiB /  35840MiB |     N/A      Default |
|                                         |                        |              Enabled |
±----------------------------------------±-----------------------±---------------------+

±----------------------------------------------------------------------------------------+
| MIG devices:                                                                            |
±-----------------±---------------------------------±----------±----------------------+
| GPU  GI  CI  MIG |              Shared Memory-Usage |        Vol|        Shared         |
|      ID  ID  Dev |                Shared BAR1-Usage | SM     Unc| CE ENC  DEC  OFA  JPG |
|                  |                                  |        ECC|                       |
|==================+==================================+===========+=======================|
|  0    0   0   0  |               1MiB / 32532MiB    | 32      0 |  2   0    2    0    2 |
|                  |               0MiB /  8192MiB    |           |                       |
±-----------------±---------------------------------±----------±----------------------+

±----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI              PID   Type   Process name                        GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|  No running processes found                                                             |
±----------------------------------------------------------------------------------------+

Basic CUDA program has worked too.