From be0b1a2abccfdf86e977e8a0186f820c6f92f47a Mon Sep 17 00:00:00 2001 From: Fabio Rehm Date: Tue, 13 May 2014 00:10:59 -0300 Subject: [PATCH] Document backingstore option and highlight that it has to be set to "none" for old lxc versions [GH-277] --- CHANGELOG.md | 3 +++ README.md | 21 +++++++++++++++++++-- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 18f9aeb..0d9ca84 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,9 @@ BACKWARDS INCOMPATIBILITIES: - The `sudo_wrapper` provider configuration was removed in favor of using the secure wrapper generated by `vagrant lxc sudoers` [[GH-272]] + - Support for specifying backingstore parameters from `Vagrantfile`s for `lxc-create` + was added and it defaults to the `best` option. On older lxc versions that does not + support that value, it needs to be set to `none`. FEATURES: diff --git a/README.md b/README.md index 21853dd..5d6aa62 100644 --- a/README.md +++ b/README.md @@ -112,8 +112,6 @@ for you. However, if the container name is important to you, you may use the ```ruby Vagrant.configure("2") do |config| - config.vm.box = "quantal64" - config.vm.define "db" do |node| node.vm.provider :lxc do |lxc| lxc.container_name = :machine # Sets the container name to 'db' @@ -123,6 +121,25 @@ Vagrant.configure("2") do |config| end ``` +### Backingstore options + +Support for setting `lxc-create`'s backingstore option (`-B`) can be specified +from the provider block and it defaults to `best`, to change it you can: + +```ruby +Vagrant.configure("2") do |config| + config.vm.provider :lxc do |lxc| + lxc.backingstore = 'none' # or 'btrfs', 'lvm', ... + end +end +``` + +For old versions of lxc (like 0.7.5 shipped with Ubuntu 12.04 by default) that +does not support `best` for the backingstore option, changing it to `none` is +required and a default for all Vagrant environments can be set from your +`~/.vagrant.d/Vagrantfile` using the same `provider` block above. + + ### Avoiding `sudo` passwords This plugin requires **a lot** of `sudo`ing since [user namespaces](https://wiki.ubuntu.com/UserNamespace)