3 ms·
It's possible to create a custom network for libvirt, but you have to add a static route to in the router for the other hosts in your LAN to see the VMs. Using
by dbolgheroni 2y ago
It's possible to create a custom network for libvirt, but you have to add a static route to in the router for the other hosts in your LAN to see the VMs.
Using virsh, you can dump the default network with net-dumpxml, which is the default bridge libvirt creates, modify it and create another network. Add the modified file with net-create (non-persistent) or net-define.
This way the VMs can participate in the LAN and, at the same time, the LAN can see your VMs. Works with wifi and doesn't depend on having workarounds for bridging wifi and ethernet. Debian has a wiki entry on how to bridge with a wireless nic [0] but I don't think it's worth the trouble.
[0] https://wiki.debian.org/BridgeNetworkConnections#Bridging_with_a_wireless_NIC https://wiki.debian.org/BridgeNetworkConnections#Bridging_wi...
- exceptione 2y agoThanks, now I remember I got stuck there because the router in question does not allow for custom routes. But why do you duplicate the default bridge? Wouldn't adding a route in the router + default bridge be enough for this setup to work?
- dbolgheroni 2y agoYou can just use the default bridge, but still have to add a static route in the router.