I have a Linux host running Arch 6.3.1 with an Ubuntu 23.04 VM running in KVM, configured with Virtual Machine Manager.
I created this VM specifically to host a Minecraft server for my daughter and I to play together on our LAN.
I can access the server fine from the host, which is my main workstation I’d be playing the game from. I can ping her Windows 10 laptop from both the guest and host while her workstation is on the WiFi and on Ethernet. From her laptop, I can ping the host but cannot ping the VM.
I would really appreciate any help anyone can give troubleshooting. I have been all over the firewall rules and have about ten hours sunk into this so far.
Thanks
1 Like
Some more information that may be helpful: Here is the XML configuration for the Virtual Network Interface of the VM:
<interface type="bridge">
<mac address="52:54:00:93:d8:68"/>
<source bridge="virbr0"/>
<target dev="vnet10"/>
<model type="virtio"/>
<link state="up"/>
<alias name="net0"/>
<address type="pci" domain="0x0000" bus="0x01" slot="0x00" function="0x0"/>
</interface>
1 Like
Seems like you are not in the same network can you share the network configuration of the adapter (IP / Subnet) as well as your Host and the Daugthers Computer?
The XML Part looks ok from my point of view but I am not an expert on these files. The machines that I use with a bridged network do not define an alias and a target and are working fine maybe you could try to remove this:
<mac address='52:54:00:93:d8:68'/>
<source bridge='br0'/>
<model type='virtio'/>
<address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
But I am just guessing here so please share the network information than it becomes much easier to help you
Wait, there’s methods of VM networking other than SR-IOV and transparent bridging?
Outbound ping from VM to laptop works, but inbound does not?
Could be a firewall/port security thing, unless win10 desktop can ping the VM?
Is the VM running any other services that one can try connecting to? Like SSH / SMB/ Minecraft server?
Also might maybe be the host might not pass ICMP/ping traffic through (maybe)
2 Likes
The VM is running SSH and the Minecraft Server but the connectivity issues from workstations to the VM exist when the Minecraft Server service is stopped. I have not stopped SSH yet to see if that makes a difference. I can try that when I get home this evening.
To help with clarity, I have attached a network diagram.
1 Like
I stopped the SSH service and it had no effect.
For reference, here is ifconfig output for the VM:
enp8s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.122.245 netmask 255.255.255.0 broadcast 192.168.122.255
inet6 fe80::5671:faa2:c60a:48ae prefixlen 64 scopeid 0x20<link>
ether 52:54:00:93:d8:68 txqueuelen 1000 (Ethernet)
RX packets 7972 bytes 19265379 (19.2 MB)
RX errors 0 dropped 503 overruns 0 frame 0
TX packets 5503 bytes 653424 (653.4 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 223 bytes 22999 (22.9 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 223 bytes 22999 (22.9 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
and here it is for the host:
enp56s0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether 04:42:1a:e7:35:4a txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
enp58s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.200.188 netmask 255.255.255.0 broadcast 192.168.200.255
ether 04:42:1a:e7:35:4b txqueuelen 1000 (Ethernet)
RX packets 5355572 bytes 6665045974 (6.2 GiB)
RX errors 0 dropped 70696 overruns 1 frame 0
TX packets 1549668 bytes 274683407 (261.9 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device memory 0xef000000-ef0fffff
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
loop txqueuelen 1000 (Local Loopback)
RX packets 36 bytes 3908 (3.8 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 36 bytes 3908 (3.8 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
virbr0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.122.1 netmask 255.255.255.0 broadcast 192.168.122.255
ether 52:54:00:dc:17:51 txqueuelen 1000 (Ethernet)
RX packets 88889 bytes 15208607 (14.5 MiB)
RX errors 0 dropped 214 overruns 0 frame 0
TX packets 102543 bytes 347683219 (331.5 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
vnet14: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
ether fe:54:00:93:d8:68 txqueuelen 1000 (Ethernet)
RX packets 1458 bytes 238761 (233.1 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1166 bytes 559469 (546.3 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
I have also confirmed that ufw is not active on the VM.
Here is ifconfig output for a different laptop running Linux with the same connection issue as the Windows machine. I have the host and VM listed below in a reply to @Trooper_ish
enp0s25: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether 68:f7:28:02:4b:d1 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 20 memory 0xf0600000-f0620000
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 1054743 bytes 149215388 (142.3 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1054743 bytes 149215388 (142.3 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlp3s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.200.151 netmask 255.255.255.0 broadcast 192.168.200.255
inet6 fe80::9e72:af1f:3268:9228 prefixlen 64 scopeid 0x20<link>
ether e8:b1:fc:b0:78:09 txqueuelen 1000 (Ethernet)
RX packets 9082726 bytes 8195699527 (7.6 GiB)
RX errors 0 dropped 219181 overruns 0 frame 0
TX packets 4031044 bytes 864504712 (824.4 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
1 Like
They are on different subnets.
I would (temporarily) amend the ip of the VM to be in the 192.168.200.xxx subnet, or the mask of everything to /16 or 255.255.0.0 first.
It might be reachable through the router, but not direct.
You could try ‘traceroute’ on the one that can talk.
Also you might need to ping the router at least once, so it can get a ARP listing of where the VM is,
For long term usage back to the IP range you want, then add an ‘IP route’ in the workstations routing table to say the 192.168.122.x range is via the host IP as a default else it might be noticing the range is out the subnet, which might be making the router looking out the network for the IP?
1 Like
Not only that they are on different, isolated networks. For your VM to be reachable, you need to bridge your physical network adapter (That you use to connect to the internet) to a new bridge (virbr1 for example). You’ll need to remove the IP from the interface and enable DHCP on the bridge as that’s now your “network adapter”. Then you can use the virbr1 bridge for the VM and if you have dhcp on enabled the VM will get an IP from your Router. Then you can access it from anywhere.
The changes I described can easily be done with nm-connection-editor.
EDIT: For clarification the virbr0 bridge behaves exactly like a switch, right now only your VM and the workstation are connected to it. Your workstation does the job of a router and runs a DHCP-server. It also masquerades all packets coming out of it. Otherwise you wouldn’t be able to ping anything from within the VM.
2 Likes
Thanks everyone. This has been solved. In addition to you all, this video helped me tremendously: VM Networking ( Libvirt / Bridge ) - YouTube
Host ifconfig output:
br0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.200.232 netmask 255.255.255.0 broadcast 192.168.200.255
ether c2:66:f4:40:1a:40 txqueuelen 1000 (Ethernet)
RX packets 56881 bytes 95556409 (91.1 MiB)
RX errors 0 dropped 1322 overruns 0 frame 0
TX packets 29529 bytes 4439490 (4.2 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
enp56s0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether 04:42:1a:e7:35:4a txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
enp58s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
ether 04:42:1a:e7:35:4b txqueuelen 1000 (Ethernet)
RX packets 391446 bytes 388908079 (370.8 MiB)
RX errors 0 dropped 6041 overruns 0 frame 0
TX packets 193070 bytes 38771798 (36.9 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device memory 0xef000000-ef0fffff
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
loop txqueuelen 1000 (Local Loopback)
RX packets 3047 bytes 282715 (276.0 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 3047 bytes 282715 (276.0 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
vnet2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
ether fe:54:00:93:d8:68 txqueuelen 1000 (Ethernet)
RX packets 37510 bytes 13719329 (13.0 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 28750 bytes 18771986 (17.9 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
VM ifconfig output:
enp8s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.200.158 netmask 255.255.255.0 broadcast 192.168.200.255
ether 52:54:00:93:d8:68 txqueuelen 1000 (Ethernet)
RX packets 28684 bytes 18764221 (18.7 MB)
RX errors 0 dropped 1029 overruns 0 frame 0
TX packets 37505 bytes 13717985 (13.7 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 343 bytes 34543 (34.5 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 343 bytes 34543 (34.5 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
4 Likes