Instance (vm guest) not getting PCI card

Mauricio Tavares raubvogel at gmail.com
Tue Jul 2 19:51:55 UTC 2019


Newbie and easy questions: I have two cards, one in each stein
(centos) compute node setup for kvm, which I want to be able to handle
to a vm guest (instance). Following
https://docs.openstack.org/nova/latest/admin/pci-passthrough.html, I

1. Setup both computer nodes to vt-t and iommu.
2. On the controller
2.1. Create a PCI alias based on the vendor and product ID
alias = { "vendor_id":"19fg", "product_id":"4000",
"device_type":"type-PF", "name":"testnic" }

- The PCI address for the card is different on each compute node

2.2. Create a flavor, say, n1.large
openstack flavor create n1.large --id auto --ram 8192 --disk 80
--vcpus 4 --property "pci_passthrough:alias"="testnic:1"

2.3. Restart openstack-nova-api

3. On each compute node
3.1. Create a PCI alias based on the vendor and product ID
alias = { "vendor_id":"19fg", "product_id":"4000",
"device_type":"type-PF", "name":"testnic" }

3.2. Create passthrough_whitelist entry
passthrough_whitelist = { "vendor_id":"19fg", "product_id":"4000" }

3.3. Restart openstack-nova-compute

4. Create instance (vm guest) using the n1.large flavor.

5. Login to instance and discover dmesg and lspci does not list card

6. Do a "virsh dumpxml" for the instance on its compute node and
discover there is no entry for the card listed in the xml file. I take
nova would automagically do what I would if this was a kvm install,
namely ensure card cannot be accessed/used by the host and then edit
the guest xml file so it can see said card.

Questions:
Q1: If a device is sr-iov capable, do I have to use that or can I just
pass the entire card to the vm guest?

Q2: Is there anywhere I can look for clues to why is the libvirt xml
file for the instance not being populated with the pci card info? So
far I only looked in the controller node's nova_scheduler.log file.



More information about the openstack-discuss mailing list