I have Ubuntu Server 16.04, lxd 2.20, machine currently connected by wifi to a home router. I want to run an owncloud server from an LXD container and I figure that the container will likely need to appear independently on the LAN so I have attempted to create a bridge but my container can’t seem to access the internet. Below I run some diagnostic commands, enter the container ‘test’ and attempt to connect to the internet. Is this some problem to do with ipv6 in the container and ipv4 on the host? How can I fix it? Any suggestions greatly appreciated! (output abridged slightly for readability, as indicated by […] )
indigo@ubuntu-server:~$ lxc network list
+-----------------+----------+---------+-------------+---------+
| NAME | TYPE | MANAGED | DESCRIPTION | USED BY |
+-----------------+----------+---------+-------------+---------+
| br0 | bridge | NO | | 1 |
+-----------------+----------+---------+-------------+---------+
| enp2s0 | physical | NO | | 0 |
+-----------------+----------+---------+-------------+---------+
| wlx08ea40f56e76 | physical | NO | | 0 |
+-----------------+----------+---------+-------------+---------+
indigo@ubuntu-server:~$ lxc network show br0
config: {}
description: ""
name: br0
type: bridge
used_by:
- /1.0/containers/test
managed: false
indigo@ubuntu-server:~$ cat /etc/network/interfaces
source /etc/network/interfaces.d/*
auto lo
iface lo inet loopback
auto br0
iface br0 inet dhcp
bridge_ports enp2s0
iface enp2s0 inet manual
indigo@ubuntu-server:~$ lxc network show br0
config: {}
description: “”
name: br0
type: bridge
used_by:
- /1.0/containers/test
managed: false
indigo@ubuntu-server:~$ ping www.google.com
[ successful ping]
indigo@ubuntu-server:~$ lxc exec test bash
root@test:~# apt-get update
[…]
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial/InRelease Temporary failure resolving ‘archive.ubuntu.com’
[…]
W: Some index files failed to download. They have been ignored, or old ones used instead.
root@test:~# ping www.google.com
ping: unknown host www.google.com
root@test:~# ping6 www.google.com
unknown host
</ code>