-
Notifications
You must be signed in to change notification settings - Fork 181
lxc container does not start because of share folders #332
Comments
Does it work if you comment out the shared folder configs? |
If i'll comment these lines it'll fail with: |
That sucks :-( I don't have a pre configured sid VM around to try this out but I'll try to have a look at this before the 1.1.0 release |
I am seeing a similar error, its failing for me because i dont have eth0. I am using device names like enp0s25 Perhaps xrmx can run ifconfig and confirm on his end? |
@Jbonnett i have eth0, wlan0 and lo interfaces on my host |
Hrmm. the plot thickens. I was able to get up and running on my machine, but I need to do some a/b testing to find the change that fixed this error message. |
Is the title of this bug still the topic? When I have share_folder lines in my Vagrantfile, I get LXC log entries:
my shared folder lines are: config.vm.synced_folder "config/", "/srv/config"
config.vm.synced_folder "log/", "/srv/log", :owner => "www-data"
if vagrant_version >= "1.3.0"
config.vm.synced_folder "www/", "/srv/www/", :owner => "www-data", :mount_options => [ "dmode=775", "fmode=774" ]
else
config.vm.synced_folder "www/", "/srv/www/", :owner => "www-data", :extra => 'dmode=775,fmode=774'
end Then vagrant hangs running lxc-ls in a loop waiting for the machine too boot, but it doesn't. Any tips on getting shared folders working? |
In my case it was caused by existing mount_options in the the Vagrantfile. Appending the "bind" option resolved the issue. |
@dstelter Could you elaborate? What bind option? |
In order to remount existing folders in a second location the bind option is needed (see http://linux.die.net/man/8/mount). Vagrant-lxc passes this flag by default, but if you specify custom mount_options this gets overwritten (see https://github.com/fgrehm/vagrant-lxc/blob/master/lib/vagrant-lxc/driver.rb#L107). It should be sufficient to modify your Vagrantfile accordingly (e.g. "dmode=0775,fmode=775,bind"). |
Confirmed - I had the same problem, thanks for the tip! I am trying to get a Vagrantfile that someone wrote for a project to work on my system under lxc. They had:
This produced the following line in the generated lxc config:
But removing the
Maybe vagrant-lxc should always append |
Maybe, except there is also create=file, so it'll have to check for that. |
Hey, sorry for the silence here but this project is looking for maintainers 😅 As per #499, I've added the |
Am trying to convert a virtualbox Vagrantfile to lxc, it fails with share folders with:
lxc-start 1418810383.099 ERROR lxc_conf - No such file or directory - failed to mount '/src/foo/bar' on '/usr/lib/i386-linux-gnu/lxc/rootfs/home/vagrant/foo/libs/bar'
Config is:
config.vm.share_folder "foo", "/home/vagrant/foo", "."
config.vm.share_folder "bar", "/home/vagrant/foo/libs/bar, "../bar/"
The Vagrantfile is in /src/foo/foo and tree is like this:
/src/foo/foo
/src/foo/foo/libs
/src/foo/bar
This is a debian sid with lxc is 1.0.6 and vagrant 1.6.5.
Any hint on what could be wrong?
The text was updated successfully, but these errors were encountered: