Before Assigning a GPU to a VM
Before you assign a GPU to a VM, you need to put the appropriate physical GPU(s) in your XenServer host and then restart the machine. Upon restart, XenServer automatically detects any physical GPU(s). To view all physical GPU(s) across hosts in the pool, use the xe
Ensure that the IOMMU chipset feature is enabled on the host. To do so, enter the following:
xe
If the value printed is false, IOMMU is not enabled, and GPU
To assign a GPU to a Windows VM using XenCenter:
1.Shut down the VM that you wish to assign a GPU.
2.Open the VM properties:
3.Assign a GPU to the VM: Select GPU from the list of VM properties, and then select a GPU type. Click OK.
4.Start the VM.
To assign a GPU to a Windows VM using xe CLI:
1.Shut down the VM that you wish to assign a GPU group by using the xe
2.Find the UUID of the GPU group by entering the following:
xe
This command prints all GPU groups in the pool. Note the UUID of the appropriate GPU group.
3.Attach the VM to a GPU group by entering the following:
xe
To ensure that the GPU group has been attached, run the xe
4.Start the VM by using the xe
5.Once the VM starts, install the graphics card drivers on the VM.
Installing the drivers is essential, as the VM has direct access to the hardware on the host. Drivers are provided by your hardware vendor.
Note:
If you try to start a VM with GPU
To detach a Windows VM from a GPU using XenCenter:
1.Shut down the VM.
2.Open the VM properties:
3.Detach the GPU from the VM: Select GPU from the list of VM properties, and then select None as the GPU type. Click OK.
4.Start the VM.
To detach a Windows VM from a GPU using the xe CLI:
1.Shut down the VM by using the xe
2.Find the UUID of the vGPU attached to the VM by entering the following:
38