From d7935e55f3c412959738c665cf3d7357e81caa92 Mon Sep 17 00:00:00 2001 From: Fabio Rehm Date: Mon, 12 May 2014 23:27:13 -0300 Subject: [PATCH] action/boot: Bind mount /sys/fs/pstore to same path on containers to fix some apparmor issues when starting Ubuntu 14.04 containers Fix GH-278 --- lib/vagrant-lxc/action/boot.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/vagrant-lxc/action/boot.rb b/lib/vagrant-lxc/action/boot.rb index e1ded4e..5a95635 100644 --- a/lib/vagrant-lxc/action/boot.rb +++ b/lib/vagrant-lxc/action/boot.rb @@ -14,6 +14,12 @@ module Vagrant utsname = env[:machine].config.vm.hostname || env[:machine].id config.customize 'utsname', utsname + # Fix apparmor issues when starting Ubuntu 14.04 containers + # See https://github.com/fgrehm/vagrant-lxc/issues/278 for more information + if Dir.exists?('/sys/fs/pstore') + config.customize 'mount.entry', '/sys/fs/pstore sys/fs/pstore none bind,optional 0 0' + end + env[:ui].info I18n.t("vagrant_lxc.messages.starting") env[:machine].provider.driver.start(config.customizations)