Hi. On Thu, May 14, 2020 at 03:13:50PM +0100, Andrew Wood wrote: > How do I pass more than one ethernet adapter to a QEMU guest. > > Doing it like this seems to attach them both on virtual bridge br1 > > kvm .... -net nic,macaddr=52:54:00:00:01:08,model=rtl8139 -net > tap,ifname=br1p5 \ > -net nic,macaddr=52:54:00:00:02:08,model=rtl8139 -net tap,ifname=br3p8
Qemu uses /etc/qemu-ifup by default which deliberately puts tap interface to the bridge which corresponds to the default route. To override this you have to: 1) Write your own replacement for /etc/qemu-ifup, two in this case. 2) Pass it to qemu with the "script" option: kvm .... -net nic,macaddr=52:54:00:00:01:08,model=rtl8139 \ -net tap,ifname=br1p5,script=/etc/my-qemu-bridge1 \ -net nic,macaddr=52:54:00:00:02:08,model=rtl8139 \ -net tap,ifname=br3p8,scrupt=/etc/my-qemu-bridge2 Reco