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#
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:
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:
However, without ‘kernel_modules=["nvidia", "nvidia-uvm", "nvidia-modeset"]’ configed, I can run the container successfully, and
modprobe -a nvidia nvidia_uvm nvidia_modesetcan be exected to load modules successfully by connecting to the virtual machine using the debug console.