O'Reilly logo

KVM Virtualization Cookbook by Konstantin Ivanov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

How it works...

In order to directly attach PCI NIC from the host OS to the guest VM, we first need to gather some hardware information about the device, such as domain, bus, slot, and function IDs. In step 1, we collect information about all available devices on the host server. We are interested in using the eth1 network interface for this example; therefore, we note down the unique PCI identification from the output--pci_0000_03_00_1 in this case.

To confirm this is indeed NIC we would like to expose to the guest, we list all PCI devices in step 2. From the output, we can see that the PCI ID is the same 03:00.1.

Using the PCI ID from step 1, we proceed to collect more information about NIC in step 3. Note that 0000_03_00_1 ID is broken ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required