, , ,

How to run GPUs on VMware Cloud Foundation

Passthrough, time-sliced vGPU or MIG-backed vGPU: the first GPU decision on VMware Cloud Foundation decides density, vMotion and HA. The same nine workloads tested all three ways, plus the setup from ESX host to VKS GPU pod. With a live demo.

How to run GPUs on VMware Cloud Foundation: passthrough, time-sliced vGPU and MIG-backed vGPU

VMware Cloud Foundation · VKS · NVIDIA AI Enterprise · vGPU · Private AI

Everything in this series so far assumed Kubernetes on bare-metal GPU servers. Many enterprises will run their GPUs on VMware Cloud Foundation instead, with VKS clusters, Deep Learning VMs and inference VMs side by side. That adds one decision that comes before all the others: how each GPU is handed to a VM. Passthrough, time-sliced vGPU or MIG-backed vGPU decide your density, whether vMotion works, and what happens when a host fails. The live demo puts the same nine workloads on two ESX hosts all three ways.

Try it: VCF GPU Lab

Two ESX hosts, eight H100s, nine GPU workloads. Switch between passthrough, time-sliced vGPU and MIG-backed vGPU, then put a host in maintenance mode or fail one.

Open the demo →

The layersWhere the GPU sits in VCF

ESX host · H100 GPUsNVIDIA vGPU host driver, installed through the vLCM image DEEP LEARNING VM Jupyter, PyTorch NVIDIA guest driver vGPU H100-10C10 GB of one GPU VKS CLUSTER · GPU WORKER NODE VMS training and inference pods pods GPU Operator: vGPU guest driver, licence, device plugin VM class gpu-h100-40cvGPU H100-40C VM class gpu-h100-40cvGPU H100-40C

Two drivers, not one: the vGPU manager on the ESX host, and a matching guest driver inside each VM or VKS node. In VKS clusters the GPU Operator installs the guest side, so parts 1 to 9 of this series apply from there up.

The choiceThree ways to give a VM a GPU

Option 1Passthrough

DirectPath I/O hands one whole physical GPU to one VM. Full bare-metal speed and no licence beyond the GPU driver. But the VM is pinned to its host: no vMotion, and HA can only restart it where an identical GPU is free.

Option 2Time-sliced vGPU

NVIDIA vGPU splits a GPU’s memory into fixed profiles such as H100-20C. VMs take turns on the compute, like time-slicing in Kubernetes. Supports vMotion and HA. Traditionally all VMs on one GPU use the same profile size.

Option 3MIG-backed vGPU

The GPU is first cut into MIG slices in hardware, then each slice is given to a VM as a profile such as H100-3-40C. Hard isolation of compute, memory and cache, and mixed sizes on one card.

The testsSame nine workloads, three outcomes

Four 40 GB VKS GPU workers, two 20 GB inference VMs and three 10 GB Deep Learning VMs, on two hosts with four H100s each. From the demo:

How many fit GPUs needed for all nine
Passthrough8 of 9 runEvery GPU used, one VM left without a GPU. Only 34% of the GPU memory handed out is needed.
Time-sliced vGPU9 of 9 on 4 GPUsFour GPUs left free for new work.
MIG-backed vGPU9 of 9 on 3 GPUsMixed slice sizes pack tighter. Five GPUs free.
Patch a host esx-01 into maintenance mode
Passthrough5 lose their GPUVMs cannot vMotion. They are powered off, and there is no free GPU on the other host to restart them.
Time-sliced vGPUAll move livevMotion to esx-02, with a short pause while GPU memory is copied.
MIG-backed vGPUAll move liveOn vGPU releases that support MIG vMotion. Check yours.
Lose a host esx-02 fails
Passthrough4 stay downHA has no matching free device to restart them on.
Time-sliced vGPUAll restartedHA restarts them on esx-01, where free GPUs can take the profiles.
MIG-backed vGPUAll restartedFree MIG slices on esx-01 take them.
A noisy neighbour one inference VM runs a heavy batch
PassthroughNobody notices, but that GPU was mostly idle before.
Time-sliced vGPUThe other VM on that GPU slows down. Equal-share or fixed-share vGPU scheduling caps the damage.
MIG-backed vGPUNobody notices. Each slice has its own hardware.
PassthroughTime-sliced vGPUMIG-backed vGPU
VMs per GPU1Several, one profile sizeUp to 7, mixed sizes
Compute isolationWhole GPUTakes turnsHardware
vMotionNoYesDepends on version
HA restartNeeds a free identical GPUYes, if a profile fitsYes, if a slice fits
LicenceGPU driverNVIDIA AI EnterpriseNVIDIA AI Enterprise
Best forBig training VMsDev, notebooks, mixed inferenceMulti-tenant, steady latency
A common pattern. Use MIG-backed or time-sliced vGPU for the VKS clusters, Deep Learning VMs and inference that make up most of the estate, and keep a few hosts in passthrough, or full-GPU profiles, for the biggest training jobs. Label those hosts so DRS and your teams know which is which.

The setupFrom ESX host to GPU pod

  1. Prepare the hosts

    Add the NVIDIA AI Enterprise vGPU host driver to the cluster’s vLCM image so every host gets the same version. In vCenter, set the host graphics type to Shared Direct for vGPU. For MIG-backed vGPU, turn MIG on for each GPU first:

    # on the ESX host, per GPU, then reset the GPU or reboot
    nvidia-smi -i 0 -mig 1
  2. Create VM classes with a vGPU

    In Workload Management → VM Classes, create a class such as gpu-h100-40c and add a PCI device: NVIDIA vGPU with the profile you want. Assign the class to the vSphere namespaces that may use GPUs.

  3. Ask for the class in the VKS cluster

    apiVersion: run.tanzu.vmware.com/v1alpha3
    kind: TanzuKubernetesCluster
    metadata:
      name: ai-cluster
      namespace: ai-team
    spec:
      topology:
        nodePools:
        - name: gpu-workers
          replicas: 4
          vmClass: gpu-h100-40c
          storageClass: vsan-default-storage-policy

    Newer VKS releases use the Cluster API Cluster object with a node pool variable for the VM class; the idea is the same.

  4. Install the GPU Operator inside the cluster

    Use the vGPU guest driver image from NVIDIA’s registry and give it your NVIDIA licence client token in a ConfigMap. From here, monitoring, logging, sharing and scheduling work exactly as in parts 1 to 9.

What Private AI Foundation with NVIDIA adds

Deep Learning VM images

Ready VMs with drivers, CUDA and frameworks, deployable from a catalog by data scientists.

GPU-ready VKS through self-service

Catalog items in VCF Automation that create GPU VKS clusters with the right VM classes.

A model store

Harbor as a private registry for models as well as images, so teams pull approved models.

GPU visibility in VCF Operations

GPU use per host and per VM next to everything else, the VCF view of part 1.

Before you call it done
  • Every host in a GPU cluster runs the same vGPU host driver from the vLCM image.
  • You chose a GPU mode per cluster on purpose, and labelled passthrough hosts.
  • HA admission control reserves enough GPU capacity to restart the VMs that matter.
  • You have measured vMotion pause times for your largest vGPU profiles.
  • VM classes with GPUs are only assigned to namespaces that should have them.
  • The guest driver version inside VKS clusters matches the host driver’s supported range.
Patch a host three ways

Open VCF GPU Lab, put esx-01 into maintenance mode in passthrough, then switch to time-sliced vGPU and do it again.

Open the demo →

Support for vMotion, HA and mixed profiles depends on your NVIDIA vGPU and VCF versions; check the NVIDIA AI Enterprise and Broadcom compatibility documents for your releases. The series so far: monitoring, logging, node lifecycle, sharing, scheduling, cost, autoscaling, networking, storage and this post. Next: the GPU platform readiness checklist.

About The Author


Discover more from Journal of Intelligent Infrastructure

Subscribe to get the latest posts sent to your email.

Leave a Reply

Your email address will not be published. Required fields are marked *

Architect’s Toolkit

About the Author

Dr. Pranay Jha is a Cloud and AI Consultant with 18+ years of experience in hybrid cloud, virtualization, and enterprise infrastructure transformation. He specializes in VMware technologies, multi-cloud strategy, and Generative AI solutions. He holds a PhD in Computer Applications with research focused on Cloud and AI, has published multiple research papers, and has been a VMware vExpert since 2016 and a VMUG Community Leader.

Discover more from Journal of Intelligent Infrastructure

Subscribe now to keep reading and get access to the full archive.

Continue reading