环境中有一台GPU服务器,新增了一块不同的加速卡,配置一下透传给虚拟机使用
原有的三块是V100 32G,新增的是V100 16G
lspci -nn |grep V100
# 输出
18:00.0 3D controller [0302]: NVIDIA Corporation GV100GL [Tesla V100 SXM2 32GB] [10de:1db5] (rev a1)
5e:00.0 3D controller [0302]: NVIDIA Corporation GV100GL [Tesla V100 SXM2 32GB] [10de:1db5] (rev a1)
86:00.0 3D controller [0302]: NVIDIA Corporation GV100GL [Tesla V100 SXM2 32GB] [10de:1db5] (rev a1)
d8:00.0 3D controller [0302]: NVIDIA Corporation GV100GL [Tesla V100 SXM2 16GB] [10de:1db1] (rev a1)
发现32G的是1db5,16G的是1bd1
由于这个集群的版本是train版本,按照文档将新的加速卡信息增加进去
train版本nova配置项参考地址:https://docs.openstack.org/nova/train/configuration/config.html
passthrough_whitelist参考配置
alias参考配置
passthrough_whitelist = [{"vendor_id":"10de","product_id":"1db5"},{"vendor_id":"10de","product_id":"1db1"}]
alias={"name":"Tesla V100", "vendor_id":"10de", "product_id":"1db5"}
alias={"name":"Tesla V100 16G", "vendor_id":"10de", "product_id":"1db1"}
配置好之后重启nova-compute服务。
alias={"name":"Tesla V100", "vendor_id":"10de", "product_id":"1db5"}
alias={"name":"Tesla V100 16G", "vendor_id":"10de", "product_id":"1db1"}
alias={"name":"Tesla V100", "vendor_id":"10de", "product_id":"1db5"}
alias={"name":"Tesla V100 16G", "vendor_id":"10de", "product_id":"1db1"}
alias={"name":"Tesla V100", "vendor_id":"10de", "product_id":"1db5"}
alias={"name":"Tesla V100 16G", "vendor_id":"10de", "product_id":"1db1"}
配置好之后重启上述服务。
增加了元数据“pci_passthrough:alias=‘Tesla V100 16G:1’”
openstack flavor show bb2bb087-d299-479a-87b8-b2472c8dab0c
+----------------------------+------------------------------------------+
| Field | Value |
+----------------------------+------------------------------------------+
| OS-FLV-DISABLED:disabled | False |
| OS-FLV-EXT-DATA:ephemeral | 0 |
| access_project_ids | None |
| disk | 600 |
| id | bb2bb087-d299-479a-87b8-b2472c8dab0c |
| name | v100 |
| os-flavor-access:is_public | True |
| properties | pci_passthrough:alias='Tesla V100 16G:1' |
| ram | 57344 |
| rxtx_factor | 1.0 |
| swap | |
| vcpus | 21 |
+----------------------------+------------------------------------------+
没有问题
记录一下同一个物理机中多块不同GPU加速卡的虚拟机透传配置。