OpenVZ Forum


Home » General » Support » Direct Access to GPU (Enabling direct hardware (GPU) access)
Direct Access to GPU [message #51568] Wed, 30 July 2014 16:36 Go to next message
Boisterous is currently offline  Boisterous
Messages: 1
Registered: July 2014
Junior Member
I'm looking to run a graphical application inside a container, but it doesn't use the GPU when it's launched, it uses software rendering which is painfully slow. When I try to install the GPU driver I get an error message saying that no suitable adapters were found.

I'm able to launch X server and connect through VNC. I added the pci rail with the GPU on it, so when I run 'lspci' inside the container, the card shows up. But if I try to run 'dmidecode' I get an error saying that the operation is not permitted.

I noticed on the wiki that it states, "direct access to hardware is not available by default." Does this mean that there's a way to grant full hardware access? Any help would be appreciated.

Just to clarify, I've been able to run the setup on the hardware environment already. So the driver and software that I'm using is all correct.
Re: Direct Access to GPU [message #51583 is a reply to message #51568] Wed, 06 August 2014 01:36 Go to previous message
devonblzx is currently offline  devonblzx
Messages: 127
Registered: December 2006
Senior Member
I'm not too knowledgeable on GPUs in Linux but I can try to help.

First, make sure the drivers and kernel modules are loaded on the host node. You won't be able to install a driver from inside the container but you can probably install a utility to manage the device once your container has access to it.

Is there a corresponding /dev device like /dev/nvidia0? If so, then grant the container access to that device. You may also need specific features granted as well, but I'm not sure on that.

Most users don't use OpenVZ for GUI. Here is the man page of vzctl if you need help with devices/features: http://openvz.org/Man/vzctl.8#Device_access_management

The one problem I see with this is OpenVZ is OS level virtualization, not hardware virtualization. Therefore you probably won't be able to have both the host and the container using the GPU. I'm not sure how that would work and I'm not sure even in hardware virtualization how the GPU is virtualized.


http://static.openvz.org/userbars/openvz-user-2.png
ByteOnSite President
Previous Topic: How to move large simfs directories from one container to another?
Next Topic: ploop image based backup and restore
Goto Forum:
  


Current Time: Mon Nov 18 01:01:34 GMT 2024

Total time taken to generate the page: 0.05256 seconds