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:
GitHub
1. Setting everything up
Repo containing the PDF for my detailed vfio configuration setup and performance tweaking. - HikariKnight/vfio-setup-docs
Jump to solution
13 Replies
zany130
zany130OP4w ago
this is how I have my network configured
<interface type="network">
<mac address="52:54:00:d4:44:42"/>
<source network="default"/>
<model type="virtio"/>
<link state="up"/>
<address type="pci" domain="0x0000" bus="0x01" slot="0x00" function="0x0"/>
</interface>
<interface type="network">
<mac address="52:54:00:d4:44:42"/>
<source network="default"/>
<model type="virtio"/>
<link state="up"/>
<address type="pci" domain="0x0000" bus="0x01" slot="0x00" function="0x0"/>
</interface>
HikariKnight
HikariKnight4w ago
give output of sudo virsh net-list if it says default is not autostarted then sudo virsh net-autostart default
zany130
zany130OP4w ago
sudo virsh net-list
[sudo] password for zany130:
Name State Autostart Persistent
--------------------------------------------
default active yes yes
sudo virsh net-list
[sudo] password for zany130:
Name State Autostart Persistent
--------------------------------------------
default active yes yes
HikariKnight
HikariKnight4w ago
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
zany130
zany130OP4w ago
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.
HikariKnight
HikariKnight4w ago
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)
zany130
zany130OP4w ago
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
No description
HikariKnight
HikariKnight4w ago
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
HikariKnight
HikariKnight4w ago
GitHub
1. Setting everything up
Repo containing the PDF for my detailed vfio configuration setup and performance tweaking. - HikariKnight/vfio-setup-docs
HikariKnight
HikariKnight4w ago
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:
zany130
zany130OP4w ago
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.
HikariKnight
HikariKnight4w ago
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
zany130
zany130OP4w ago
Yup worked like a charm have internet accses on my VM thanks ! Again no idea why the default wasn't working :zerotwoshurg:
Want results from more Discord servers?
Add your server