JavaScript is required

Developing with Vagrant and Ubuntu 16.04


Developing with Vagrant and Ubuntu 16.04

When upgrading my Vagrant-run development environment to Ubuntu 16.04 (xenial) from 14.04 (trusty), I encountered a few vexing issues. Here's what I did to fix them.

  1. Make sure your versions of Vagrant and Virtualbox (if this is your provider) are up-to-date.
  2. The normal Ubuntu Vagrant box does not seem to work. In other words, changing your box to config.vm.box = "ubuntu/xenial64" is going to be open a world of hurt. See here and here for more. I've found success with the boxes made by Bento. Solution: Change Vagrant Box to
config.vm.box = "bento/ubuntu-16.04"
  1. With Ubuntu 16.04, there seems to be a recurring issue with running upgrades. With the version of I am using at the time of this post (bento/ubuntu-16.04 v2.3.1), it can trigger an upgrade screen for Grub. This breaks the ability to run a provisioning script non-interactively. The issue seems to pop-up occasionally; see here.

Solution: Tell the system to handle any prompts non-interactively

export DEBIAN_FRONTEND=noninteractive apt-get -y -o DPkg::options::="--force-confdef" -o DPkg::options::="--force-confold" upgrade