I am running a virtual machine with virt-manager on my Ubuntu 16.04 server and am trying to get the guest into the same network as the host.

I have attempted to follow these directions however I ended up with a guest which can ping the host, but not the internet.

Host Config

host$ cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
#auto enp3s0
#iface enp3s0 inet dhcp
iface enp3s0 inet manual

auto br1
iface br1 inet dhcp
        bridge_ports enp3s0
        bridge_stp off
        bridge_fd 0
        bridge_maxwait 0

host$ brctl show
bridge name     bridge id               STP enabled     interfaces
br1             8000.002590606dae       no              enp3s0
docker0         8000.024255cb1799       no              veth12ab6bb
virbr0          8000.525400263616       yes             virbr0-nic

host$ ip address show br1
89: br1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 00:25:90:60:6d:ae brd ff:ff:ff:ff:ff:ff
    inet brd scope global br1
       valid_lft forever preferred_lft forever
    inet6 fe80::225:90ff:fe60:6dae/64 scope link 
       valid_lft forever preferred_lft forever

host$ ip address show enp3s0
2: enp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master br1 state UP group default qlen 1000
    link/ether 00:25:90:60:6d:ae brd ff:ff:ff:ff:ff:ff

Guest Config

From /etc/libvirt/qemu/testvm.xml on the host:

<interface type='bridge'>
      <mac address='52:54:00:ad:ab:0c'/>
      <source bridge='br1'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>

In the guest, the ens3 network interface is configured for DHCP and is not getting an IP address. The guest is using netplan.

  • Is there even a DHCP server on your local network? We see that you configured the host's IP address manually instead of via DHCP. – Michael Hampton Aug 28 '18 at 18:44
  • There is a DHCP server. Can you elaborate on where you see that please? I experimented with statically configuring the IP on the host when I was first setting up the bridge, but was having trouble with it and went back to DHCP. – tgrosinger Aug 28 '18 at 19:56
  • You posted: iface enp3s0 inet manual Of course, that has no effect after you added it to bridge br1. So... – Michael Hampton Aug 28 '18 at 19:58
  • Ah sure, one of the guides I was following set that to prevent the interface from causing problems accidentally. I have tried with and without that line. – tgrosinger Aug 28 '18 at 22:20

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.