nvidia-smi No devices were found on KVM VM
OS - Ubuntu 18.04.1 LTS
RAM - 8GB
GPU - Nvidia GeForce GTX 1050Ti
Laptop - Acer Predator Helio 300
Secure Boot - Disabled
I followed KVM : GPU Passthrough guide to launch VM that should use GPU.
Updated grub config
GRUB_CMDLINE_LINUX="intel_iommu=on iommu=pt rd.driver.pre=vfio-pci video=efifb:off"
Added VFIO modules
veeru@ghost:~$ cat /etc/initram-fs/modules
vfio
vfio_iommu_type1
vfio_pci
vfio_virqfd
veeru@ghost:~$ lspci -nn | grep -i nvidia
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GP107M [GeForce GTX 1050 Ti Mobile] [10de:1c8c] (rev a1)
veeru@ghost:~$ cat /etc/modprobe.d/vfio.conf
options vfio-pci ids=10de:1c8c
options vfio-pci disable_vga=1
After reboot I verified IOMMU is enabled by running below commands
veeru@ghost:~$ dmesg | grep -E "DMAR|IOMMU"
[ 0.000000] ACPI: DMAR 0x0000000089CEB000 0000A8 (v01 ACRSYS ACRPRDCT 00000002 1025 00040000)
[ 0.000000] DMAR: IOMMU enabled
[ 0.004000] DMAR: Host address width 39
[ 0.004000] DMAR: DRHD base: 0x000000fed90000 flags: 0x0
---- OUTPUT REMOVED -------
veeru@ghost:~$ dmesg | grep -i vfio
[ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-4.15.0-42-generic root=UUID=d4aa9af4-beb0-4da2-969c-3e41e01f335b ro intel_iommu=on iommu=pt rd.driver.pre=vfio-pci video=efifb:off quiet splash vt.handoff=1
---- OUTPUT REMOVED -----
Switched X to use Intel CPU

Started VM with virt-install and installed OS
sudo virt-install
--name vm1
--memory 2028
--disk path=/home/veeru/ubuntu14-HD.img,size=30
--vcpus 2
--os-type linux
--os-variant ubuntu16.04
--network bridge=virbr0
--graphics none
--console pty,target_type=serial
--location /home/veeru/Downloads/ubuntu-16.04.5.iso --force
--extra-args 'console=ttyS0,115200n8 serial'
--host-device 01:00.0
--features kvm_hidden=on
--machine q35
After login to VM, I installed nvidia drivers with ubuntu-drivers autoinstall and did apt update && apt upgrade.
Inside VM, I'm able run below commands and check outputs
veeru@ubuntu:~$ lspci | grep -i nvidia
03:00.0 VGA compatible controller: NVIDIA Corporation Device 1c8c (rev a1)
veeru@ubuntu:~$ lsmod | grep -i nvidia
nvidia_uvm 675840 0
nvidia_drm 49152 0
nvidia_modeset 860160 1 nvidia_drm
nvidia 13164544 2 nvidia_modeset,nvidia_uvm
drm_kms_helper 155648 1 nvidia_drm
drm 364544 3 drm_kms_helper,nvidia_drm
veeru@ubuntu:~$ ls -l /dev/nvidia*
crw-rw-rw- 1 root root 195, 0 Dec 13 02:33 /dev/nvidia0
crw-rw-rw- 1 root root 195, 255 Dec 13 02:33 /dev/nvidiactl
crw-rw-rw- 1 root root 246, 0 Dec 13 02:33 /dev/nvidia-uvm
But it looks like VM is not using GPU
veeru@ubuntu:~$ nvidia-smi
No devices were found
I see some similar issue and mailing list like
https://devtalk.nvidia.com/default/topic/847649/cuda-setup-and-installation/nvidia-smi-quot-no-devices-were-found-quot-error-/
https://lists.freebsd.org/pipermail/freebsd-virtualization/2017-January/005119.html
Any help would be appreciated. Thank you
virtualbox virtual-machine gpu nvidia-graphics-card nvidia-geforce
add a comment |
OS - Ubuntu 18.04.1 LTS
RAM - 8GB
GPU - Nvidia GeForce GTX 1050Ti
Laptop - Acer Predator Helio 300
Secure Boot - Disabled
I followed KVM : GPU Passthrough guide to launch VM that should use GPU.
Updated grub config
GRUB_CMDLINE_LINUX="intel_iommu=on iommu=pt rd.driver.pre=vfio-pci video=efifb:off"
Added VFIO modules
veeru@ghost:~$ cat /etc/initram-fs/modules
vfio
vfio_iommu_type1
vfio_pci
vfio_virqfd
veeru@ghost:~$ lspci -nn | grep -i nvidia
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GP107M [GeForce GTX 1050 Ti Mobile] [10de:1c8c] (rev a1)
veeru@ghost:~$ cat /etc/modprobe.d/vfio.conf
options vfio-pci ids=10de:1c8c
options vfio-pci disable_vga=1
After reboot I verified IOMMU is enabled by running below commands
veeru@ghost:~$ dmesg | grep -E "DMAR|IOMMU"
[ 0.000000] ACPI: DMAR 0x0000000089CEB000 0000A8 (v01 ACRSYS ACRPRDCT 00000002 1025 00040000)
[ 0.000000] DMAR: IOMMU enabled
[ 0.004000] DMAR: Host address width 39
[ 0.004000] DMAR: DRHD base: 0x000000fed90000 flags: 0x0
---- OUTPUT REMOVED -------
veeru@ghost:~$ dmesg | grep -i vfio
[ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-4.15.0-42-generic root=UUID=d4aa9af4-beb0-4da2-969c-3e41e01f335b ro intel_iommu=on iommu=pt rd.driver.pre=vfio-pci video=efifb:off quiet splash vt.handoff=1
---- OUTPUT REMOVED -----
Switched X to use Intel CPU

Started VM with virt-install and installed OS
sudo virt-install
--name vm1
--memory 2028
--disk path=/home/veeru/ubuntu14-HD.img,size=30
--vcpus 2
--os-type linux
--os-variant ubuntu16.04
--network bridge=virbr0
--graphics none
--console pty,target_type=serial
--location /home/veeru/Downloads/ubuntu-16.04.5.iso --force
--extra-args 'console=ttyS0,115200n8 serial'
--host-device 01:00.0
--features kvm_hidden=on
--machine q35
After login to VM, I installed nvidia drivers with ubuntu-drivers autoinstall and did apt update && apt upgrade.
Inside VM, I'm able run below commands and check outputs
veeru@ubuntu:~$ lspci | grep -i nvidia
03:00.0 VGA compatible controller: NVIDIA Corporation Device 1c8c (rev a1)
veeru@ubuntu:~$ lsmod | grep -i nvidia
nvidia_uvm 675840 0
nvidia_drm 49152 0
nvidia_modeset 860160 1 nvidia_drm
nvidia 13164544 2 nvidia_modeset,nvidia_uvm
drm_kms_helper 155648 1 nvidia_drm
drm 364544 3 drm_kms_helper,nvidia_drm
veeru@ubuntu:~$ ls -l /dev/nvidia*
crw-rw-rw- 1 root root 195, 0 Dec 13 02:33 /dev/nvidia0
crw-rw-rw- 1 root root 195, 255 Dec 13 02:33 /dev/nvidiactl
crw-rw-rw- 1 root root 246, 0 Dec 13 02:33 /dev/nvidia-uvm
But it looks like VM is not using GPU
veeru@ubuntu:~$ nvidia-smi
No devices were found
I see some similar issue and mailing list like
https://devtalk.nvidia.com/default/topic/847649/cuda-setup-and-installation/nvidia-smi-quot-no-devices-were-found-quot-error-/
https://lists.freebsd.org/pipermail/freebsd-virtualization/2017-January/005119.html
Any help would be appreciated. Thank you
virtualbox virtual-machine gpu nvidia-graphics-card nvidia-geforce
It's obviously there. Maybe nvidia-smi is not the correct tool to use. Why don't you try just using it? What's your use case?
– HackSlash
Dec 26 '18 at 22:49
@HackSlash Well I want to run kubernetes on the VM i.e. the containers should use GPU
– Veerendra
Dec 27 '18 at 10:23
Right, but what is the application? What is actually using the GPU? Can you just run it? Test it?
– HackSlash
Dec 31 '18 at 17:06
add a comment |
OS - Ubuntu 18.04.1 LTS
RAM - 8GB
GPU - Nvidia GeForce GTX 1050Ti
Laptop - Acer Predator Helio 300
Secure Boot - Disabled
I followed KVM : GPU Passthrough guide to launch VM that should use GPU.
Updated grub config
GRUB_CMDLINE_LINUX="intel_iommu=on iommu=pt rd.driver.pre=vfio-pci video=efifb:off"
Added VFIO modules
veeru@ghost:~$ cat /etc/initram-fs/modules
vfio
vfio_iommu_type1
vfio_pci
vfio_virqfd
veeru@ghost:~$ lspci -nn | grep -i nvidia
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GP107M [GeForce GTX 1050 Ti Mobile] [10de:1c8c] (rev a1)
veeru@ghost:~$ cat /etc/modprobe.d/vfio.conf
options vfio-pci ids=10de:1c8c
options vfio-pci disable_vga=1
After reboot I verified IOMMU is enabled by running below commands
veeru@ghost:~$ dmesg | grep -E "DMAR|IOMMU"
[ 0.000000] ACPI: DMAR 0x0000000089CEB000 0000A8 (v01 ACRSYS ACRPRDCT 00000002 1025 00040000)
[ 0.000000] DMAR: IOMMU enabled
[ 0.004000] DMAR: Host address width 39
[ 0.004000] DMAR: DRHD base: 0x000000fed90000 flags: 0x0
---- OUTPUT REMOVED -------
veeru@ghost:~$ dmesg | grep -i vfio
[ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-4.15.0-42-generic root=UUID=d4aa9af4-beb0-4da2-969c-3e41e01f335b ro intel_iommu=on iommu=pt rd.driver.pre=vfio-pci video=efifb:off quiet splash vt.handoff=1
---- OUTPUT REMOVED -----
Switched X to use Intel CPU

Started VM with virt-install and installed OS
sudo virt-install
--name vm1
--memory 2028
--disk path=/home/veeru/ubuntu14-HD.img,size=30
--vcpus 2
--os-type linux
--os-variant ubuntu16.04
--network bridge=virbr0
--graphics none
--console pty,target_type=serial
--location /home/veeru/Downloads/ubuntu-16.04.5.iso --force
--extra-args 'console=ttyS0,115200n8 serial'
--host-device 01:00.0
--features kvm_hidden=on
--machine q35
After login to VM, I installed nvidia drivers with ubuntu-drivers autoinstall and did apt update && apt upgrade.
Inside VM, I'm able run below commands and check outputs
veeru@ubuntu:~$ lspci | grep -i nvidia
03:00.0 VGA compatible controller: NVIDIA Corporation Device 1c8c (rev a1)
veeru@ubuntu:~$ lsmod | grep -i nvidia
nvidia_uvm 675840 0
nvidia_drm 49152 0
nvidia_modeset 860160 1 nvidia_drm
nvidia 13164544 2 nvidia_modeset,nvidia_uvm
drm_kms_helper 155648 1 nvidia_drm
drm 364544 3 drm_kms_helper,nvidia_drm
veeru@ubuntu:~$ ls -l /dev/nvidia*
crw-rw-rw- 1 root root 195, 0 Dec 13 02:33 /dev/nvidia0
crw-rw-rw- 1 root root 195, 255 Dec 13 02:33 /dev/nvidiactl
crw-rw-rw- 1 root root 246, 0 Dec 13 02:33 /dev/nvidia-uvm
But it looks like VM is not using GPU
veeru@ubuntu:~$ nvidia-smi
No devices were found
I see some similar issue and mailing list like
https://devtalk.nvidia.com/default/topic/847649/cuda-setup-and-installation/nvidia-smi-quot-no-devices-were-found-quot-error-/
https://lists.freebsd.org/pipermail/freebsd-virtualization/2017-January/005119.html
Any help would be appreciated. Thank you
virtualbox virtual-machine gpu nvidia-graphics-card nvidia-geforce
OS - Ubuntu 18.04.1 LTS
RAM - 8GB
GPU - Nvidia GeForce GTX 1050Ti
Laptop - Acer Predator Helio 300
Secure Boot - Disabled
I followed KVM : GPU Passthrough guide to launch VM that should use GPU.
Updated grub config
GRUB_CMDLINE_LINUX="intel_iommu=on iommu=pt rd.driver.pre=vfio-pci video=efifb:off"
Added VFIO modules
veeru@ghost:~$ cat /etc/initram-fs/modules
vfio
vfio_iommu_type1
vfio_pci
vfio_virqfd
veeru@ghost:~$ lspci -nn | grep -i nvidia
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GP107M [GeForce GTX 1050 Ti Mobile] [10de:1c8c] (rev a1)
veeru@ghost:~$ cat /etc/modprobe.d/vfio.conf
options vfio-pci ids=10de:1c8c
options vfio-pci disable_vga=1
After reboot I verified IOMMU is enabled by running below commands
veeru@ghost:~$ dmesg | grep -E "DMAR|IOMMU"
[ 0.000000] ACPI: DMAR 0x0000000089CEB000 0000A8 (v01 ACRSYS ACRPRDCT 00000002 1025 00040000)
[ 0.000000] DMAR: IOMMU enabled
[ 0.004000] DMAR: Host address width 39
[ 0.004000] DMAR: DRHD base: 0x000000fed90000 flags: 0x0
---- OUTPUT REMOVED -------
veeru@ghost:~$ dmesg | grep -i vfio
[ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-4.15.0-42-generic root=UUID=d4aa9af4-beb0-4da2-969c-3e41e01f335b ro intel_iommu=on iommu=pt rd.driver.pre=vfio-pci video=efifb:off quiet splash vt.handoff=1
---- OUTPUT REMOVED -----
Switched X to use Intel CPU

Started VM with virt-install and installed OS
sudo virt-install
--name vm1
--memory 2028
--disk path=/home/veeru/ubuntu14-HD.img,size=30
--vcpus 2
--os-type linux
--os-variant ubuntu16.04
--network bridge=virbr0
--graphics none
--console pty,target_type=serial
--location /home/veeru/Downloads/ubuntu-16.04.5.iso --force
--extra-args 'console=ttyS0,115200n8 serial'
--host-device 01:00.0
--features kvm_hidden=on
--machine q35
After login to VM, I installed nvidia drivers with ubuntu-drivers autoinstall and did apt update && apt upgrade.
Inside VM, I'm able run below commands and check outputs
veeru@ubuntu:~$ lspci | grep -i nvidia
03:00.0 VGA compatible controller: NVIDIA Corporation Device 1c8c (rev a1)
veeru@ubuntu:~$ lsmod | grep -i nvidia
nvidia_uvm 675840 0
nvidia_drm 49152 0
nvidia_modeset 860160 1 nvidia_drm
nvidia 13164544 2 nvidia_modeset,nvidia_uvm
drm_kms_helper 155648 1 nvidia_drm
drm 364544 3 drm_kms_helper,nvidia_drm
veeru@ubuntu:~$ ls -l /dev/nvidia*
crw-rw-rw- 1 root root 195, 0 Dec 13 02:33 /dev/nvidia0
crw-rw-rw- 1 root root 195, 255 Dec 13 02:33 /dev/nvidiactl
crw-rw-rw- 1 root root 246, 0 Dec 13 02:33 /dev/nvidia-uvm
But it looks like VM is not using GPU
veeru@ubuntu:~$ nvidia-smi
No devices were found
I see some similar issue and mailing list like
https://devtalk.nvidia.com/default/topic/847649/cuda-setup-and-installation/nvidia-smi-quot-no-devices-were-found-quot-error-/
https://lists.freebsd.org/pipermail/freebsd-virtualization/2017-January/005119.html
Any help would be appreciated. Thank you
virtualbox virtual-machine gpu nvidia-graphics-card nvidia-geforce
virtualbox virtual-machine gpu nvidia-graphics-card nvidia-geforce
edited Dec 20 '18 at 10:10
Veerendra
asked Dec 18 '18 at 9:07
VeerendraVeerendra
1561212
1561212
It's obviously there. Maybe nvidia-smi is not the correct tool to use. Why don't you try just using it? What's your use case?
– HackSlash
Dec 26 '18 at 22:49
@HackSlash Well I want to run kubernetes on the VM i.e. the containers should use GPU
– Veerendra
Dec 27 '18 at 10:23
Right, but what is the application? What is actually using the GPU? Can you just run it? Test it?
– HackSlash
Dec 31 '18 at 17:06
add a comment |
It's obviously there. Maybe nvidia-smi is not the correct tool to use. Why don't you try just using it? What's your use case?
– HackSlash
Dec 26 '18 at 22:49
@HackSlash Well I want to run kubernetes on the VM i.e. the containers should use GPU
– Veerendra
Dec 27 '18 at 10:23
Right, but what is the application? What is actually using the GPU? Can you just run it? Test it?
– HackSlash
Dec 31 '18 at 17:06
It's obviously there. Maybe nvidia-smi is not the correct tool to use. Why don't you try just using it? What's your use case?
– HackSlash
Dec 26 '18 at 22:49
It's obviously there. Maybe nvidia-smi is not the correct tool to use. Why don't you try just using it? What's your use case?
– HackSlash
Dec 26 '18 at 22:49
@HackSlash Well I want to run kubernetes on the VM i.e. the containers should use GPU
– Veerendra
Dec 27 '18 at 10:23
@HackSlash Well I want to run kubernetes on the VM i.e. the containers should use GPU
– Veerendra
Dec 27 '18 at 10:23
Right, but what is the application? What is actually using the GPU? Can you just run it? Test it?
– HackSlash
Dec 31 '18 at 17:06
Right, but what is the application? What is actually using the GPU? Can you just run it? Test it?
– HackSlash
Dec 31 '18 at 17:06
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1385488%2fnvidia-smi-no-devices-were-found-on-kvm-vm%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1385488%2fnvidia-smi-no-devices-were-found-on-kvm-vm%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
It's obviously there. Maybe nvidia-smi is not the correct tool to use. Why don't you try just using it? What's your use case?
– HackSlash
Dec 26 '18 at 22:49
@HackSlash Well I want to run kubernetes on the VM i.e. the containers should use GPU
– Veerendra
Dec 27 '18 at 10:23
Right, but what is the application? What is actually using the GPU? Can you just run it? Test it?
– HackSlash
Dec 31 '18 at 17:06