Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
NFS access denied by server while mounting #100
When using NFS as shared folder mechanism an error occurs while mounting:
Exports looks as follows:
Mounting locally does work when changing IP to 127.0.0.1.
Has it to do with a known issue of the Ubuntu 14.04 LXC base box?
I don't think so as the NFS client is available.
That's unfortunate. These NFS mount issues are difficult to debug. I just tested on my Ubuntu 14.04 machine and everything seems to be working fine with lxc:
Also on Virtualbox:
For virtualbox my
I did notice however that nfs_guest does not work with lxc so you can't use that as an alternative. It is generally more compatible because most of the configuration happens inside the machine, not on the host. The vagrant-nfs_guest plugin will yield this error:
Have you seen my comments in this thread? Maybe those can point you in the right direction. Also, do you have an encrypted homedir by any chance? That can cause permissions issues, but seems unlikely if using
If you figured it out I'd love to know what the problem was for future reference.
I've altered the sudoers file but this makes no effect. Indeed, I don't need to enter my password anymore but that wan't the issue so to see.
I think it is remarkable that my export files look the same:
On my host:
Firewall is disabled:
Host -> Client pingable and v.v.
NFS export even shows up on the client. Showing all NFS exports of the host on the client:
Enabling RPC debugging on the server:
Verbose mounting of NFS share on client:
Tail of the syslog on host:
AppArmor problems... Seems that NFS is not allowed by default for LXC containers. Must be noted though that the AppArmor service is not actively running on the system but it is installed though (came with LXC probabily).
So, I went looking for the LXC config and the corresponding AppArmor profile that was set. I changed to policy to unconfined:
Deleted the Vagrant box, restart and now it's working... Check that Vagrant destroy actually destroys the LXC machine:
Thanks for the help anyhow!
Thanks for investigating! Ran into the same issue trying to get vagrant-nfs_guest to work with lxc.
By the way, we noticed something similar for our own internal Vagrant images a while back transitioning to Ubuntu 16.04 hosts. For future googlers, if this didn't solve it and you're having app armor related issues with lxc try this: