In this configuration multiple macvtap interfaces are bound over the same PF. For each VM created, libvirt will automatically instantiate a macvtap driver instance and the macvtap interfaces will be visible on the host.
Where the KVM libvirt bridged configuration uses the standard Linux bridge, a direct bridged configuration bypasses this providing an internal bridging function and increasing performance.
When using macvtap there is no link state propagation to the guest which is unable to identify if a physical link is up or down.
Macvtap does not currently forward multicast joins from the guests to the underlying network driver with the result that all multicast traffic received by the physical port is forwarded to all guests. Due to this limitation this configuration is not recommended for deployments that use a non-trivial amount of multicast traffic.
Guest migration is fully supported as there is no physical hardware state in the VM guests. A guest can be migrated to a host using a different VF or a host without an SR-IOV capable adapter.
Configuring KVM Direct Bridged
To configure a KVM Direct Bridged setup:
- Ensure the AMD Solarflare adapter driver (sfc.ko) is installed on the host.
- Create virtual machines.
You can create VMs from the standard Linux
virt-managerGUI interface, or from the equivalentvirshcommand line tool.Note: To start the GUI interface, run thevirt-managercommand as root from a terminal .You can also create VMs from an existing VM XML file.
The following example procedure assumes the VM is created. It creates an interface configuration file and connects the VM directly to the X4 series adapter.
- Create a configuration file for the required X4 series PF (
HWADDR) in a config file in /etc/sysconfig/network-scripts/ifcfg-eth4. This example uses eth4:DEVICE=eth4 TYPE=Ethernet HWADDR=74:27:2C:21:00:60 BOOTPROTO=none ONBOOT=yes - Bring up the interface:
# service network restart - On the host machine, edit the VM XML file:
# virsh edit <vmname> - Add the interface component to the VM XML file:
<interface type='direct'> <source dev='eth4' mode='bridge'/> <model type=’virtio’/> </interface> - Restart the VM after editing the XML file.
# virsh start <vmname> - The bridged interface is visible when viewed from the GUI Virtual Machine Manager:Figure 2. Virtual Machine Manager, Showing the Direct Bridged Interface
XML Description for KVM Direct Bridged
The following extract is from the VM XML file after the configuration procedure has been applied. Line numbers have been added for ease of description:
1. <interface type='direct'>
2. <mac address='52:54:00:db:ab:ca'/>
3. <source dev='eth4' mode='bridge'/>
4. <model type='virtio'/>
5. <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
6. </interface>
- The interface type. This must be specified as ‘direct’.
- The MAC address. If this is not specified a random MAC address is assigned automatically by libvirt.
- The source dev. This is the PF interface identifier added in configuration step 3 above. The mode must also be specified as ‘bridge’.
- The model type. If this is not specified it is assigned automatically by libvirt when the guest is started. Use 'virtio' for best performance.
- The PF PCIe address (as known by the guest). This is added automatically by libvirt.
For further information about the direct bridged configuration and XML formats, refer to the following link: