Internet connectivity on a windows VM
As the title says how can i get internet accses on a libvirt virtual machine running windows? the strange thing is this WAS working oottb before but stopped after an update or something
I can see the network adapter from the windows VM and it even has an ip adress but no internet connectivity
Solution:Jump to solution
GitHub
1. Setting everything up
Repo containing the PDF for my detailed vfio configuration setup and performance tweaking. - HikariKnight/vfio-setup-docs
13 Replies
this is how I have my network configured
give output of
sudo virsh net-list
if it says default is not autostarted then sudo virsh net-autostart default
it should just work then if you have the virtio drivers installed in windows
if you dont then you need to change the model to something else that will work in windows without a driver
like the e1000 or something i think its called
Yeah it detects the adpater as a redhat virtio something (forgot exactly)
and it even sees an ip address and everything but I can't connect to any website.
do you need the VM to communicate with the host? as in do you need them to be able to talk with each other over the network (ie; samba filesharing)
Yeah I need to share files between the two but I haven't set that up0 yet not sure if a bridge is better I just left the vm at default settings.
here is what windows shows
i use 2 virtual nics for that as i need the vm directly attached to my network and i need the host to communicate with the guest over network
making a bridge that works is a PITA and i always forget how to do it properly so i just use 2 nics
1 macvtap interface and i link it to the real nic i use
1 isolated network that is just dhcp with no routing (for communicating with the host)
Solution
GitHub
1. Setting everything up
Repo containing the PDF for my detailed vfio configuration setup and performance tweaking. - HikariKnight/vfio-setup-docs
there is a guide on adding the isolated network which i always add as the 2nd nic
1st one is always the macvtap device
this lazy way to avoid making a bridge has worked for 8 years so :clueless:
LOL thanks Ill take a look. It's strange the default stoped working but maybe it's a good chance to setup a share between the host and the guest LOL.
yeah so when you use the share between host and guest use the "isolated" ip for both
since macvtap does not allow communication between host and guest
Yup worked like a charm have internet accses on my VM thanks ! Again no idea why the default wasn't working :zerotwoshurg: