1

I am running a Virtual Machine on a Host that is hardwired to my LAN. The Host shows up on my local network (as do the other Hosts connected by Wifi) but the VM Guest does not. Initially this was because the VM Guest was NATed from the Host. The VM Guest could reach the internet and other servers on my LAN but other servers could not reach it. This makes sense. What I want to have happen is the Guest VM show up on the network as if they were hardwired directly to it like the host. For the life of me I cannot figure out what I am missing.

I have a basic home network setup. It looks like the following image:

enter image description here

  • Netgear Nighthawk wifi/router
  • Intel NUC host hardwired to router
    • Ubuntu Server OS
    • KVM/QEMU virtualization

I initially set up the VM with the NATed configuration like so (the default network is the NATed bridged network):

enter image description here

The above worked great but again, I could not reach the VMs from other devices on the LAN (because they VMs were NATed).

I then tried to set up a Routed configuration so that each VM would get their own IP and could:

  • reach the internet
  • be reachable from other hosts on the LAN

What I was trying to do was something similar to this: enter image description here

I created a new virtual network as follows: enter image description here

With the above setup however the VM cannot reach the internet and is not reachable from other hosts on the network. It is almost is if I somehow set things up in a DMZ behind the Host.

From everything I've read, setting up the Routed configuration (through virbr3 as in the image above) should create a Virtual Network on the Host that is of type "Routed" which will cause the Host to just pass through. I can see on the Host's ARP table that it knows about the VM Guest: enter image description here

What I would expect to see when I log into my Netgear router is the VM Guest listed as a wired connection, but it is not listed. I tried to go in to the router and manually and add a reserved IP address for the IP of the VM Guest (and the VM Guest's MAC Address) thinking that network requests for that IP would be routed appropriately, but they are not. It is almost as if the Host knows about the VM but is not advertising the routes correctly and the router doesn't know about the Guest VM so that when I try to ping the Guest's IP from a different Host on the LAN the router doesn't know where to send it? Any suggestions on how to remedy this?

EDIT

I realized one step missing was adding a static route in my NetGear router so that it knew where to forward requests to the IP addresses associated with VMs (through the eth0 gateway). Now I can ping the VMs from other hosts on the network so that is a huge step forward. The only remaining issue is that now the VMs can't reach the internet (i.e. google.com).

EDIT 2

The output from traceroute google.com on the Guest VM is as follows: enter image description here

192.168.100.1 is the local gateway.
192.168.1.1 is my wireless gateway I believe. I'm making this call because it shows up as the default gateway on the Host and on my Mac which is also connected to the LAN.

  • What is the output of tracepath 8.8.8.8 from those VMs? – hkdtam May 16 '16 at 6:32
  • So I can nslookup google.com but I can't ping the IP address returned. Furthermore, because traceroute isn't installed on my VM I can't install it because the VM can't reach the repos. :( – MCP May 17 '16 at 3:35
  • Added Edit 2 which includes traceroute google.com. It looks like my request makes it through the local/default gateway but then never makes it past 192.168.1.1 which is my wireless gateway? – MCP May 17 '16 at 3:53
  • Have you restarted the router as well as your virtual network switch? – NetworkKingPin May 17 '16 at 4:58
  • Hum can you elaborate more about the local gateway .100.1 and actually with your .1.128/25 network your VMs aren't supposed to reach .1.1? – hkdtam May 17 '16 at 4:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.