Score:0

NVIDIA Drivers on Ubuntu VM

Im trying to set up Tensorflow on Ubuntu that I install on Virtual Box. I already install some packages but still doenst seems to work. The error message that I get all time while I try to run the nvidia-smi command on terminal is:

NVIDIA-SMI has failed because it couldnt communicate with the NVIDIA driver.

I also try to install drivers for my GPU(GEFORCE GTX 1050 Ti) and I was getting this message:

You do not appear to have NVIDIA GPU supported by the 515.76 NVIDIA Linux graphics driver installed in this system.

And

You appear to be running an X server; Please exit X before installing.

So, Am I facing those problems because I run the Ubuntu system on VM? Is there any change I have to make on my options for this box? Why VM cant recognition my GPU?

I already install everything it needs on my windows 10 profile and I want to do the same on this Virtual Box

Thanks for you time.

cn flag
Ray
Never heard of this working via Virtual Box. If you don't want to install Ubuntu on to your hard disk, you can consider using a USB disk -- boot off of that instead?
Σωτηρης Ιωαννιδης avatar
Yeah me neither. And I cant find a page that shows how to install it on VM. Still I want to have both operation systems on so thats why I give it a try... But probably Ill install ubuntu on hard disk.
cn flag
Ray
I don't know much about this, but my gut feeling is that it would work if somehow you could "pre-allocate" resources from the Virtual Box configuration. For example, for an image, you can choose to give it 4 threads instead of 1; or 8 GB of memory instead of 4 GB. Otherwise, what would happen if you played a PC game using the Nvidia card while trying to run Tensorflow on the VM? I haven't used Virtual Box recently, but I don't think that option to "pre-allocate" parts of the GPU card is available (of course, I might be wrong). Good luck!
Score:0
cn flag

You can't install Nvidia divers to a VirtualBox machine. It has no direct access to GPU hardware.

Score:0
in flag

According to the Administrator's Guide for Release 6.0 experimental host PCI devices passthrough is available. I don't know how well this works. That means you must have at least 2 GPUs, and in your case the passed through (1060's) isn't available on your host system. Further you must enable IOMMU for passthrough.To sum it up here some requirements:

  • Your motherboard has an IOMMU unit.

  • Your CPU supports the IOMMU.

  • The IOMMU is enabled in the BIOS.

  • The VM must run with VT-x/AMD-V and nested paging enabled.

  • Your Linux kernel was compiled with IOMMU support, including DMA remapping. See the CONFIG_DMAR kernel compilation option. The PCI stub driver (CONFIG_PCI_STUB) is required as well.

  • Your Linux kernel recognizes and uses the IOMMU unit. The intel_iommu=on boot option could be needed. Search for DMAR and PCI-DMA in kernel boot log.

Another non-free solution is vmware.

However on linux systems I favorite the free libvirt environment for that purposes. On this git repo you can clone a nice Nvidia GPGPU Pass-Through with KVM start up example.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.