NIC Passthrough
Cheat sheet · https://pcornel.dk/topic.php?topic=3549
Answer
NIC passthrough gives a VM a physical network card or port for line-rate, low-latency networking, typically for firewalls or NFV. It bypasses the virtual switch and limits migration; SR-IOV virtual functions are often a better compromise.
Remember
- Bypasses virtual switch and its features.
- Blocks migration.
- Consider SR-IOV instead.
First checks
lspci -nnk | grep -A3 Ethernet— NIC bound to vfioethtool -i <if>— guest driverip -s link— guest counters
Verify in this order
physical NIC → vfio → guest driver
Where it usually breaks
First mismatch in host capability/IOMMU/NUMA → hypervisor allocation/mapping → virtual hardware model → guest driver/enumeration → workload use; preserve identity/native error/pre-state before mutation.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=3549