Skip to content

Commit

Permalink
Workaround to configure lxd bridge on xenial
Browse files Browse the repository at this point in the history
On Ubuntu 16.04, the lxdbr0 bridge is configured by default as
link-local only. This isn't very helpful when we want to connect
containers to the internet. This patch adds another step that configures
the bridge.
  • Loading branch information
UniversalSuperBox authored and mardy committed Sep 27, 2018
1 parent 2340507 commit 3a7c2dc
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions crossbuilder
Expand Up @@ -188,6 +188,21 @@ ensure_lxd_subuid () {

setup_lxd () {
echo "${POSITIVE_COLOR}Setting up LXD.${NC}"

if [ "$(lsb_release -cs)" = "xenial" ]; then
echo "${ERROR_COLOR}You are running Ubuntu 16.04 (xenial).${NC}"
echo "We have found an issue where the default LXD setup on 16.04 does not allow"
echo "containers to connect to the internet."
echo "In the following dialog, set up an IPv4 and IPv6 subnet for your bridge so they"
echo "will be able to connect to the internet. The default options presented will do"
echo "this for you."
echo "Press Enter to start"
read KEY
unset $KEY
# Ubuntu 16.04 specific workaround to set up
sudo dpkg-reconfigure -p medium lxd
fi

if [ -n "$ENCRYPTED_HOME" ] ; then
echo -n "${ERROR_COLOR}Your home folder is encrypted. $PROGRAM_NAME will use priviledged "
echo -n "LXD containers and the default storage backend (slower).\n${NC}"
Expand Down

0 comments on commit 3a7c2dc

Please sign in to comment.