Vagrant LXC error, mount.nfs: mount to NFS server ‘10.0.3.1:/path’ failed: timed out, giving up

Vagrant-LXC is a plugin that provides integration of Vagrant with LXC containers, a modern virtualisation technology native to Linux. To share files between the host and the container, NFS can be used. The Vagrant NFS plugin ensures that a NFS server runs at the host that exports predefined locations of the host’s filesystem. Sometimes, an error pops up when starting a Vagrant box, indicating that a timeout occurred and that starting the box failed.¬†

A typical error is as follows:

Which means that the connection is blocked, often due to the firewall. Another error might be something like:

This practically means that the container is not allowed to reach the NFS server of the host, often due to AppArmor policy. I experienced this issue some time ago and discussed it in an issue at Github.

Continue reading Vagrant LXC error, mount.nfs: mount to NFS server ‘10.0.3.1:/path’ failed: timed out, giving up