After installing a GPU device on the host, follow the steps in this section to complete the relevant configuration to use the GPU device on a virtual machine.
Precaution
When using GPU passthrough, you also need to refer to the official documentation of the GPU device manufacturer for configuration. The document names mentioned in this section are examples of a specific version, and different versions may vary slightly.
Preparation
Install the GPU driver on the virtual machine that will mount and use the GPU device, and then obtain the NVIDIA Graphics Driver from the NVIDIA official website based on the GPU model, virtual machine operating system, and driver version officially supported by the GPU device manufacturer.
Procedure
Enable IOMMU for the host where the GPU device is located and restart the host.
Set the GPU mode to passthrough.
If you are using this GPU device for the first time, the mode is set to passthrough by default. You can proceed directly to Step 3. If the GPU device has previously been sliced as vGPUs, first switch the GPU mode to passthrough.
Install the GPU driver for the virtual machine:
Refer to the Installing the NVIDIA vGPU Software Graphics Driver chapter in Virtual GPU Software User Guide in the NVIDIA official documentation.
Restart the virtual machine.