Virt-manager and macvtap on wifi

My eOS linux host is on wifi and I want to reach the guest from a different device, not important to reach it from the host. I have tried bridges a few weeks ago, but it got confusing and frustrating. So many approaches, guides for different distros, 10+ years old forum posts etc. I don’t remember why I couldn’t do it using the arch wiki. I remember I spent hours trying everything. Today I thought I will try macvtap, wiki says it’s simpler…

I have managed to create a macvtap device like this:
It shows up in virt-manager’s virtual networks, but I don’t know how to assign it to a vm, it doesn’t show up in the NIC configuration

I have also tried to create macvtap from the NIC config but it throws an operation not permitted error. I have already added myself to the kvm and libvirt groups. Throws the same error if I try to create a new vm.

Is it possible to reach a guest someway when the host is on wifi? I managed to do it on windows.

I also saw some guides for wifi, but all were for virt-install and whatnot commands, and I don’t know how to use those with virt-manager’s xml config. I want to use virt-manager(gnome-boxes) so I won’t have to juggle a dozens of commands.

So I managed to have a solution, which is good enough for me, without a proper bridge and macvtap.

The default network was missing. I couldn’t enable the default network from the user session, probably the user session is only good for connecting the guest to the internet. I realized I need to connect to the qemu:///system after starting the libvirtd to be able to add interfaces.

First I wanted macvtap, but that’s complicated too on wifi, maybe it’s possible with something called ipvtap. At this point I gave up on macvtap.

After that I had the idea to forward host ports to guest ports(you need to enable ipv4 port forwarding in sysctl) This can be extended with additional ports I think.

Now at least I can connect to the guest’s ssh from my windows machine.

I spent like 5+ hours with this thing the last few weeks and I missed these details about libvirt. The forwarding solution wasn’t even mentioned here

1 Like