set tap0 using virt-manager for bridged wireless

DaveO asked:

After 3 days I finally have kvm guests working on the network via wireless (link below – thanks!):

My network is

on the host:

sudo sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward"
sudo tunctl -t tap0
sudo ip link set tap0 up
sudo ip addr add dev tap0
sudo route add -host dev tap0
sudo parprouted wlan0 tap0

on the guest:

auto eth0
iface eth0 inet static

and start the guest:

sudo kvm /path/to/guest.img -net nic,macaddr=DE:AD:BE:EF:90:26 -net tap,ifname=tap0,script=no

This works great and I can ping the local network and the internet back and forth between the guest.

But how do I add these settings to the guest’s xml config so I can start the guest via virt-manager with the same nic settings?


My answer:

What’s wrong with using macvtap? This is completely painless and doesn’t require any further configuration on the host.

macvtap selection in virt-manager

View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.