r/openstack • u/NiclasCash • Apr 08 '21
Any experiences running VMs with vGPUs (NVIDIA vCS) on OpenStack?
Dear Openstackers,
I am working at a smaller university and we are in the process of creating a computing cluster for educational purposes (Data Science, ML, Cloud Technologies…). We already have an evaluation/testing instance of OpenStack running, consisting of 7 servers we already had. So far things look very promising.
Our next step is adding machines with GPUs to the cluster that are capable of running ML workloads. I guess there are two options: Either pass through the physical cards to VMs or using vGPUs. For the latter it's hard to find any practical experience on the internet. What can be found is the official docs of NVIDIA and OpenStack saying in theory it should be possible.
Seems like the major challenges are…
Using a OS "supported" by NVIDIA's drivers on host and guests
Running a supported hypervisor
You need to buy additional licenses to use any of the vGPU or passthrough options (vCS, vDWS, ...)
Telling OpenStack that there are now hosts with GPUs in them
Is there anyone out here running a cluster with GPU-machines and vGPUs? If yes what GPUs and OS are you running on the host/guest? I'm especially interested in setups running Ubuntu Host/Guests on KVM and NVIDIA GPUs. We do not have any servers with GPUs around, so there is not try&error option at the moment. Before we spend a lot of money on servers with GPUs I want to be safe that the setup will be operational at least somehow.
Thank you!
1
u/tvojamatka Apr 08 '21
It is really interesting. I would like to know as well. I will upvote. Did you have a look at:
1
u/amedeos Apr 11 '21
The correct way is to bought a certified gpu from nvidia but if you have a GeForce you can have a try with:
1
u/iammpizi Feb 12 '22
This is long overdue but I will reply for posterity.
I run vGPUs on Ussuri . Centos8 Compute OS. and Centos 7 Guest. Worked like a charm. The main issue was that because you need drivers on the host AND on the guest you are tied to the versions that nvidia provides and at the time of the deployment (1 year ago) nvidia provided only rpms for RHEL that by some magic worked on Centos. So no Ubuntu guest I am afraid. (at least not back then. Maybe things have changed now)
1
u/syssas Jul 12 '22
What about passing through the GPUs to the VMs on openstack, do you have any experience?
We are on a similar scenario as the original post but typically our users need the whole GPU (sometimes, more than one), so we don't need to split GPUs with vGPU. Besides, I believe that the passthough option does not require any licensing.
1
u/iammpizi Jul 13 '22
This is pci - passthrough which is far simpler and should work with most cards. I dont have nodes like that anymore. I assume it would work with a good combination of kernel + libvirt + maybe some firmware config
1
u/Jpc204 Dec 03 '22
Totally orthogonal, but did you consider just baremetal with Nvidia GPUs? Is that straight forward? Some workloads need bm like ai training.
Tia
3
u/pr0f1t Apr 08 '21
I have used Nvidia Grid with KVM for this exact purpose (Cuda development machines for GPGPU workloads). I don't know that there are any openstack specific aspects to the setup. You would just be creating and managing VM's in openstack as usual, but the machines in question would have a vGPU attached. You do need to buy Grid licenses for this type of setup, and you need to get a compatible card (we ran Tesla M10's). I don't remember there being anything special about provisioning the VM's except adding the vGPU and making sure that the base image already had the proper Nvidia driver to match the hypervisor, or adding the drver after spinning up the VM. We were doing this on RHEL7, and for what it's worth, we abandoned that setup in favor of vsphere hypervisors in the end. We found KVM to be less stable than the vmware option at the time.