此内容没有您所选择的语言版本。

Appendix H. Preparing a Host for vGPU Installation


Installing a vGPU on a Virtual Machine

You can use a host with a compatible graphics processing unit (GPU) to run virtual machines with virtual GPUs (vGPUs). A virtual machine with a vGPU is better suited for graphics-intensive tasks than a virtual machine without a vGPU. A virtual machine with a vGPU can also run software that cannot run without a GPU, such as CAD.

vGPU Requirements

If you plan to configure a host to allow virtual machines on that host to install a vGPU, the following requirements must be met:

  • vGPU-compatible GPU
  • GPU-enabled host kernel
  • Installed GPU with correct drivers
  • Predefined mdev_type set to correspond with one of the mdev types supported by the device
  • vGPU-capable drivers installed on each host in the cluster
  • vGPU-supported virtual machine operating system with vGPU drivers installed

Preparing a Host for vGPU Installation

  1. Install vGPU-capable drivers onto your host. Consult the documentation for your GPU card for more information.
  2. Install vdsm-hook-vfio-mdev:

    # yum install vdsm-hook-vfio-mdev
    Copy to Clipboard Toggle word wrap

You can now install vGPUs on the virtual machines running on this host.

Installing a vGPU on a Virtual Machine

  1. Confirm the vGPU instance to use:

    • Click Compute Hosts, click the required host’s name to go to the details view, and click the Host Devices tab. Available vGPU instances appear in the Mdev Types column.
    • Alternatively, run the following command on the host:

      # vdsm-client Host hostdevListByCaps
      Copy to Clipboard Toggle word wrap

      Available vGPU instances appear in the mdev key available_instances.

  2. Install the required virtual machine operating system. See Installing Linux Virtual Machines and Installing Windows Virtual Machines in the Virtual Machine Management Guide.
  3. Shut down the virtual machine.
  4. Add the vGPU instance to the virtual machine:

    1. Select the virtual machine and click Edit.
    2. Click Show Advanced Options, then click the Custom Properties tab.
    3. Select mdev_type from the drop-down list and enter the vGPU instance in the text field.
    4. Click OK.
  5. Start the virtual machine and install the vGPU driver through the vendor’s installer. Consult the documentation for your GPU card for more information.
  6. Restart the virtual machine.
  7. Verify that the vGPU is recognized by checking the virtual machine operating system’s device manager.
Important

You cannot migrate a virtual machine using a vGPU to a different host. When upgrading the virtual machine, verify the operating system and GPU vendor support in the vendor’s documentation.

返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat