-
Notifications
You must be signed in to change notification settings - Fork 442
Add fabric manager configuration support #2045
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Michail Resvanis <mresvani@redhat.com>
|
How coincidental that I resolved to implement something like this and 2 hours ago you submitted this draft! I want to ask what the plan is for the CDI-side. The ideal scenario is that the fabricmanager can be spawned as a Kata container, which means we need to inject the NVSwitch VFIO cdevs just like how we do for passthrough GPUs. When I tried to use GPU operator a few months ago, this was simply not possible at the time so I used libvirt instead. Does the GPU Operator CDI already expose the NVswitches to k8s now? I apologize if my knowledge is a little out of date. |
5f8e006 to
e27e938
Compare
…-passthrough Signed-off-by: Michail Resvanis <mresvani@redhat.com>
Signed-off-by: Michail Resvanis <mresvani@redhat.com>
Signed-off-by: Michail Resvanis <mresvani@redhat.com>
When clusterPolicy.fabricManager.mode=shared-nvswitch and workload=vm-passthrough, the vfio-manager now preserves the NVIDIA driver for fabric management while enabling GPU device passthrough to VMs. Changes: - Modify TransformVFIOManager to detect shared-nvswitch mode. - Replace driver uninstall init container with device unbind init container. - Use vfio-manage unbind --all to detach devices from nvidia driver. - Keep nvidia driver loaded for fabric management functionality. - Add comprehensive unit tests for both normal and shared-nvswitch modes. The new flow for shared-nvswitch mode for the vfio-manager: 1. InitContainer: vfio-manage unbind --all (unbind from nvidia driver) 2. Container: vfio-manage bind --all (bind to vfio-pci) This enables simultaneous fabric management and VM passthrough capabilities.
Signed-off-by: Michail Resvanis <mresvani@redhat.com>
c53ceaa to
70c5d78
Compare
Signed-off-by: Michail Resvanis <mresvani@redhat.com>
70c5d78 to
28c95d9
Compare
Description
This PR enables Fabric Manager (FM) configuration for
vm-passthroughworkloads using the Shared NVSwitch virtualization model.It enables users to configure the Fabric Manager mode (i.e.
FABRIC_MODE=[0,1,2],0- full-passthrough,1- shared NVSwitch,2- vGPU) through theClusterPolicyCRD, providing better support for NVIDIA multi-GPU systems in virtualized environments.In the FM shared NVSwitch virtualization model the NVIDIA driver on the host is used for the NVSwitch devices, while the GPU devices are bound to the
vfio-pcidriver. The goal is for the GPU devices to be passed-through to kubevirt VMs, while the respective fabric is managed on the host.Depends on / relates to: NVIDIA/gpu-driver-container#538
Changes
ClusetrPolicy API
FabricManagerSpecto theClusterPolicyCRD with support for two modes:full-passthrough(FABRIC_MODE=0) - default mode.shared-nvswitch(FABRIC_MODE=1) - shared NVSwitch virtualization mode.Controller logic
vm-passthroughwith FM shared NVSwitch mode and pass an env var to the driver container to indicate the selected fabric mode (the driver container is the one configuring and starting the FM).Driver state management
vm-passthroughand FM shared NVSwitch mode case.vm-passthroughwith shared NVSwitch mode.Sandbox validator
VFIO manager
nvidia-smi, which requires the driver to be loaded and bound to the GPU devices. Once that's done we can bind the GPU devices to vfio-pci.vfio-manage unbind --allwhen FM shared NVSwitch mode.Checklist
make lint)make validate-generated-assets)make validate-modules)Testing
TBD