From 5fb0bcbcbc6081a1c1affab3b90ddb493e3556dd Mon Sep 17 00:00:00 2001 From: Cam Cope Date: Mon, 17 Aug 2015 14:23:55 -0700 Subject: [PATCH] make /tmp a tmpfs --- lib/vagrant-lxc/action/boot.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/vagrant-lxc/action/boot.rb b/lib/vagrant-lxc/action/boot.rb index 90b783f..08d331d 100644 --- a/lib/vagrant-lxc/action/boot.rb +++ b/lib/vagrant-lxc/action/boot.rb @@ -26,6 +26,9 @@ module Vagrant config.customize 'mount.entry', '/sys/fs/selinux sys/fs/selinux none bind,ro 0 0' end + # Make /tmp a tmpfs to prevent init scripts from nuking synced folders mounted in here + config.customize 'mount.entry', 'tmpfs tmp tmpfs nodev,nosuid,size=2G 0 0' + env[:ui].info I18n.t("vagrant_lxc.messages.starting") env[:machine].provider.driver.start(config.customizations)