Proxmox VM Configuration:
- Create a New VM: Create a new Linux VM (e.g., Ubuntu 22.04/24.04 LTS). Use OVMF (UEFI) for BIOS and Qemu Agent in the System tab for better compatibility.
- Edit VM Configuration: Before starting the VM, edit its configuration file (
/etc/pve/qemu-server/XXX.conf, where XXX is the VM ID) to addCPU: host,hidden=1to improve compatibility. - Add the PCI Device: In the Proxmox Web UI, go to the VM’s Hardware tab and select Add > PCI Device.
- Select your NVIDIA GPU from the drop-down list.
- Check All functions, Primary GPU (if it’s the only one), and PCI-E.
- Set Display to
none: Change the Display option tononeto prevent conflicts with the passed-through GPU. You will need SSH or a separate VNC/RDP client to access the VM.
MicroK8s and AI Setup (within the VM)
- Install NVIDIA Drivers: Inside the VM, install the appropriate NVIDIA guest drivers matching your GPU model.
- Install MicroK8s: Follow the official guide to install MicroK8s within the VM.
- Enable NVIDIA Gpu Addon: Use the MicroK8s command to enable the NVIDIA GPU acceleration addon, which installs necessary components like the NVIDIA device plugin for Kubernetes to recognize and utilize the GPU. Command –
microk8s enable gpu - Verify: Run
nvidia-smiin the VM console to confirm the GPU is recognized and working, and usemicrok8s kubectl get nodes -o wideand check the allocatable resources to ensure the GPU is available to the Kubernetes cluster.
For more detailed, step-by-step Proxmox configuration, consider following the guides on the Proxmox Wiki.