Network connection on Win11 VM in virt-manager with QEMU / KVM

Hello,

I am trying to connect a Win11 VM to my home network. I just want it to get a regular IP from my DHCP server. I setup my VM following this tutorial: Windows 11 in Virt-Manager - Guides and Tutorials - Linus Tech Tips

I have already tried setting DNS servers, but I think my problem is deeper within QEMU/KVM/virt-manager.

How do I simply pass my network connection through to the VM?

Here are some details:

$ nmcli device status
DEVICE   TYPE      STATE                   CONNECTION 
enp39s0  ethernet  connected               Home LAN   
virbr1   bridge    connected (externally)  virbr1     
wlo1     wifi      unavailable             --         
lo       loopback  unmanaged               --

I tried adding a bridge following the instructions here: Network bridge - ArchWiki

sudo ip link add name vmbridge type bridge
sudo ip link set vmbridge up
sudo ip link set enp39s0 master vmbridge

With this I managed to get a connection in the Win11 VM with these settings in virt-manager:
12312312312

But then I noticed while the bridge is active, I do not have internet connection on my host system (or at least in Firefox, ping google.com works…).

I am a bit lost on how to set this up properly. Please advise :slight_smile:

Any hints someone? :slight_smile:

Have you tried the NAT option for the virtual network adapter (that should be the default setting)?

This may be of some help:

https://wiki.manjaro.org/index.php/Virt-manager

In Virt-Manager go to Edit Tab › Connection Details › Virtual Networks and make sure the default network is enabled.

In case you can’t enable it you need to install theses packages: iptables-nft and dnsmasq

pamac install iptables-nft dnsmasq

Then restart libvirt service

sudo systemctl restart libvirtd 

And check if the default connection,you should be able to enable it.

And in the VM settings,select the default connection instead of the bridge one.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.