-
Notifications
You must be signed in to change notification settings - Fork 181
FAQ
The base boxes use UID 1000 for the vagrant user. So if your UID on the host box is something other than 1000, shared folders will be owned by something other than the vagrant user.
You can work around this problem via judicious chown'ing, or by using rsync or NFS shared folders instead.
See GH-191 for additional information.
Before the 0.3.0 version of this plugin, there used to be a support for specifying the container's rootfs path from the Vagrantfile, on 0.3.0 this was removed as you can achieve the same effect by symlinking or mounting /var/lib/lxc
on a separate partition.
NFS synced folders work since v1.0.0.alpha.1. See GH-191 for additional information. You may need to modify /etc/apparmor.d/lxc/lxc-default to allow NFS access from your LXC container.
At some point Vagrant's network configurations will be supported, for now you can use the provider block like:
Vagrant.configure("2") do |config|
config.vm.box = "quantal64"
config.vm.provider :lxc do |lxc|
lxc.customize 'network.ipv4', '10.0.3.15/24'
end
end
Please keep in mind that it won't work for any IP you pass in, please check this issue for more information.
See the Base boxes page of this wiki.
Why do I get Could not chdir to home directory /home/vagrant: Permission denied
when vagrant-lxc attempts to SSH into the guest?
Make sure the user you are running the vagrant
command as has the ability to access the guest vagrant directory directly (ie. on the host, not the guest). Depending on the host distribution, this might be on a path like /var/lib/lxc/<some guest>/rootfs/home/vagrant
. If the umask permissions are too tight, you might find the <some guest>/rootfs
directory permissions are too tight.