I am trying to create two VMs with libvirt which are connected to a linux bridge (my_bridge). I also want that linux bridge to be connected to the physical interface eth0 of the host. Can I do that? According to https://wiki.libvirt.org/page/VirtualNetworking, it should be possible by configuring it this way:

  <forward dev='eth0' mode='nat'/>
  <bridge name='my_bridge' stp='on' delay='0'/>
  <mac address='52:54:00:e9:8f:a8'/>
  <ip address='' netmask=''/>

However, that configuration creates the brige 'my_bridge' but it never connects eth0 to that bridge. Am I doing something wrong

  • the documentation tells about having the host become a router between its eth0 interface (doing NAT) and its bridge interface (that's the virtual LAN where the VM will be). It never told that eth0 would be put in the bridge.That should probably not be the role of the hypervisor to do this, because it would affect the host. It should be done beforehand by the host OS (or done quite differently by the hypervisor, using macvtap, eg: Bridge vs Macvlan , Some notes on macvlan/macvtap ). – A.B Jul 18 '18 at 17:07

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.