vGPU选择
NVIDIA 虚拟 GPU 软件产品包括 GRID 虚拟 PC (GRID vPC)、GRID 虚拟应用程序 (GRID vApp),以及 Quadro 虚拟数据中心工作站 (Quadro vDWS)。
- vGPU推荐对比:https://www.nvidia.cn/data-center/graphics-cards-for-virtualization/
- vGPU支持型号:https://docs.nvidia.com/grid/gpus-supported-by-vgpu.html
- vGPU支持服务器:https://www.nvidia.com/en-us/data-center/resources/vgpu-certified-servers/
- vGPU文档:https://docs.nvidia.com/grid/index.html
vGPU驱动安装
vGPU驱动说明:
A physical GPU that is passed through to a VM is bound to the vfio-pci kernel module. A physical GPU that is bound to the vfio-pci kernel module can be used only for pass-through. To enable the GPU to be used for vGPU, the GPU must be unbound from vfio-pci kernel module and bound to the nvidia kernel module.
环境信息
- 系统:CentOS Linux release 7.8.2003 (Core)
- 内核:3.10.0-1127.el7.x86_64
驱动安装
1 | 查看GPU信息 |
问题汇总
问题1:安装报X library path '/usr/lib64' ... were not queryable from the system
,问题截图如下:
解决办法:关闭vnc server
vGPU使用
宿主机使用
1 | 查看GPU PCI信息 |
虚机使用
创建虚机增加如下配置:
1 | -device vfio-pci,sysfsdev=/sys/bus/mdev/devices/8da209ce-7865-48f0-9b04-fd6ef55dca63 -uuid xxxxxxxxxxxxxxxxxxxxx |
虚机xml内相关配置如下:
1 | <hostdev mode='subsystem' type='mdev' managed='no' model='vfio-pci' display='off'> |
后面就是虚拟机内部安装对应的驱动程序了,一般名称为:xxxx_grid_win10_server2016_server2019_64bit_international.exe
vGPU授权
NVIDIA的vGPU在虚拟机内部使用是需要购买license的,具体的部署方式是需要搭建一台授权服务器,虚拟机内部安装显卡驱动后需要配置授权服务器的地址和端口,前提是虚拟机和授权服务器网络是通的,虚拟机每次开机后都要连接到授权服务器进行授权。
Table 1. NVIDIA vGPU Software Licensed Products
NVIDIA vGPU Software Licensed Product | Target Users | Supported NVIDIA vGPU Software Deployments |
---|---|---|
GRID Virtual Applications | Users of PC-level applications and server-based desktops that use Citrix Virtual Apps and Desktops, VMware Horizon, RDSH, or other app streaming or session-based solutions | - A-series NVIDIA vGPUs - GPU pass through - Microsoft DDA - VMware vDGA - Bare metal |
GRID Virtual PC | Users of business virtual desktops who require a great user experience with PC applications for Windows, web browsers, and high-definition video | - B-series NVIDIA vGPUs - Microsoft RemoteFX vGPU - VMware vSGA |
Quadro vDWS | Users of mid-range and high-end workstations who require access to remote professional graphics applications with full performance on any device anywhere | - Q-series NVIDIA vGPUs - B-series NVIDIA vGPUs - GPU pass through - Microsoft DDA - VMware vDGA - Bare metal |