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" }
On Tue, 2019-07-02 at 15:51 -0400, Mauricio Tavares wrote: the alias looks correcect. assuming you have it set in teh pci section https://docs.openstack.org/nova/latest/configuration/config.html#pci.alias then i should generate teh request of a pci device. the alias needs to be defiend in the nova.conf used by the api node and the compute node for it to work correctly but i assume that when you say its set on the contoler it set on the nova.conf the nova api is useing.
- 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"
this is also correct
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" }
assuming this is set in the pci section it also looks correct https://docs.openstack.org/nova/latest/configuration/config.html#pci.passthr...
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.
yes you should have seen it in the xml and the card should have been passed through to the guest.
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.
you can passthorugh the entire card to the guest yes. there are several things to check. first i would check the nova compute agenet log and see if there are any tracebacks or errors second in the nova cell db, often called just nova or nova_cell1 (not nova_cell0) check the pci_devices table and see if the devices are listed.