Configuring GPU Partitioning (vGPU) on VMware vSphere 8: Optimizing Resources for AI and VDI

VMware tutorial - IT technology blog
VMware tutorial - IT technology blog

Why Should You Partition Your GPU (vGPU) on VMware vSphere 8?

Owning powerful graphics cards like the NVIDIA A100, L40, or RTX 6000 Ada is every admin’s dream. However, assigning an entire physical card to a single virtual machine (DirectPath I/O) often wastes 70-80% of the resources. Unless you are training massive AI models (LLMs), tasks like running internal chatbots, fine-tuning small models, or deploying VDI don’t fully utilize the card’s potential.

In a real-world project I deployed on an 8-host ESXi cluster, the challenge was to meet the needs of a Data Science team’s 15 virtual machines using only two A100 80GB cards. NVIDIA vGPU technology on vSphere 8 was the key. It allows “slicing” the physical GPU into multiple smaller GPU Partitions, helping you optimize hardware investment costs effectively.

Pre-configuration Checklist

Don’t rush into the installation just yet. Ensure you have the following components ready to avoid running into errors midway through:

  • Hardware: Enterprise-grade NVIDIA cards (Tesla, Ampere, Ada Lovelace). Note: Consumer GeForce cards do not officially support vGPU on ESXi.
  • License: NVIDIA vGPU Software License (GRID, vCS, or vWS). This is mandatory because without a license, GPU performance will be throttled after 20 minutes.
  • Driver: NVIDIA VIB file specifically for ESXi and the corresponding driver for the Guest OS (Windows/Linux).
  • vSphere 8: Upgrade to version 8.0 to take advantage of Device Groups and smooth vMotion capabilities when using vGPU.

Step 1: Installing the NVIDIA Host Driver (VIB) on ESXi

First, put the ESXi host into Maintenance Mode. You can use WinSCP to upload the driver file (.vib) to the host’s datastore.

Open SSH to the host and execute the following commands:

# Enable Maintenance Mode
esxcli system maintenanceMode set --enable true

# Install driver from datastore
esxcli software vib install -v /vmfs/volumes/datastore1/NVIDIA-VMware_ESXi_8.0_Host_Driver_535.129.03-1OEM.800.1.0.20613240.vib

# Reboot the system
reboot

After the host reboots, check the status of the card using the nvidia-smi command. If the stats table displays the temperature and power consumption correctly, you’re halfway there.

Step 2: Configuring the Graphics Device on vSphere Client

By default, ESXi often treats graphics cards as “Shared”. To enable vGPU features, we need to switch to Shared Direct mode.

  1. Access vCenter, select Host ESXi -> Configure -> Hardware -> Graphics.
  2. In the Graphics Devices tab, select the corresponding NVIDIA card and click Edit.
  3. Switch to Shared Direct mode (Vendor shared passthrough).
  4. Restart the host one last time for this change to take full effect.

Step 3: Assigning a vGPU Profile to the Virtual Machine (VM)

This is where you decide how much of the “resource pie” each virtual machine will receive. For example, an A100 80GB card can be split among 10 VMs, with each VM having 8GB of dedicated VRAM.

How to do it:

  1. Right-click the VM -> Edit Settings.
  2. Select Add New Device -> PCI Device.
  3. In the new device section, select NVIDIA vGPU.
  4. Choose the appropriate GPU Profile. Pay attention to the suffix letters:
    • Q: For professional graphics design (Quadro).
    • C: Optimized for AI and Deep Learning computations (Compute).
    • A: For general virtualization applications.

Example: The grid_a100-4c profile will grant the VM 4GB of VRAM and is optimized for AI computing tasks.

Important Note: A very common mistake is forgetting to check Reserve all guest memory. vGPU requires the VM to lock physical RAM; memory overcommitment is not allowed. Without this option, the VM will throw an error as soon as it is powered on.

Step 4: Installing the Driver on the Guest OS and Verifying

When the VM starts, the operating system will detect a new PCI device but in an inactive state. You need to install the NVIDIA Driver specific to the Guest OS (which must match the version of the Driver on the ESXi host).

On Ubuntu, you can quickly verify this with the nvidia-smi command. The result will display the exact vGPU Profile you assigned (e.g., 4GB VRAM) instead of the full capacity of the physical card. At this point, you are ready to install CUDA, Docker, and deploy applications like Stable Diffusion.

Monitoring and License Management

In actual operation, monitoring GPU load is extremely important. vSphere 8 has significantly improved this area. You no longer need to SSH into each host to run manual commands.

Right in the host’s Monitor tab on the vCenter interface, visual charts for VRAM and % GPU utilization for each VM will be displayed. This makes it easy to report system performance to management or decide when to invest in new cards.

Regarding Licensing: Don’t forget to set up the NVIDIA License Client inside the VM. If it cannot connect to the License Server (DLS or CLS), computing performance will drop significantly after a short period of use.

Closing Thoughts from Real-world Experience

Deploying vGPU on vSphere 8 is not technically difficult, but it requires meticulousness in profile selection and license management. If you are working in a lab, “vGPU Unlock” solutions on GitHub can be an interesting option. However, for production environments, always use genuine licenses to ensure stability and receive timely support from NVIDIA.

If you encounter the “Module DevicePowerOn failed” error, check the RAM Reservation first. 90% of cases stem from this. Good luck with your deployment!

Share: