Skip to content
This repository was archived by the owner on May 12, 2021. It is now read-only.
This repository was archived by the owner on May 12, 2021. It is now read-only.

Load nvidia kernel modules using kata configuration file failed #709

@RyanAoh

Description

@RyanAoh

Description of problem

I used kata 1.9.3 with ‘kernel_modules=["nvidia", "nvidia-uvm", "nvidia-modeset"]’ configed,those module files(.ko) have been added to the rootfs image.
Then I run the following command to add a nvidia GPU vfio device into VM:

docker run -it --rm  --device /dev/vfio/45 -v /dev:/dev centos:7 bash

Expected result

The container runs normally, and modules("nvidia", "nvidia-uvm", "nvidia-modeset") should be loaded automaticly

Actual result

The container run failed. The error message is as follows:

root@zs-GPU-kata-1:~# docker run -it --rm  --device /dev/vfio/45 -v /dev:/dev centos:7 bash
docker: Error response from daemon: OCI runtime create failed: rpc error: code = Unknown desc = could not load module: exit status 1: modprobe: ERROR: could not insert 'nvidia': No such device
insmod /lib/modules/4.19.75/kernel/drivers/video/nvidia.ko nvidia-uvm nvidia-modeset: unknown.

However, without ‘kernel_modules=["nvidia", "nvidia-uvm", "nvidia-modeset"]’ configed, I can run the container successfully, and modprobe -a nvidia nvidia_uvm nvidia_modeset can be exected to load modules successfully by connecting to the virtual machine using the debug console.

bash-4.2# lsmod
Module                  Size  Used by
bash-4.2# modprobe -a nvidia nvidia_uvm nvidia_modeset
bash-4.2# lsmod
Module                  Size  Used by
nvidia_modeset       1085440  0
nvidia_uvm            823296  0
nvidia              18141184  2 nvidia_uvm,nvidia_modeset
bash-4.2#

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions