Vagrants synced folders over NFS do not work with libvirt provider

Hi there,

I am currently trying to use Vagrant on my Arch based Linux system. I setup a Vagrantfile that starts with

Vagrant.configure("2") do |config|
  config.vm.provider :libvirt do |libvirt|
    # setup VM parameters
    libvirt.memory = "1024"
    libvirt.cpus = 4
  end =  "centos/7"
  config.vm.synced_folder ".", "/vagrant", type: "nfs"
  # configure a macvtap device to get an IP from the host network :public_network,
      :dev => "enp8s0",
      :mode => "bridge",
      :type => "direct"

The problem is vagrant up, that is supposed to setup the virtual machine, fails during the step it should setup the NFS synced folders between the host and the guest:

==> default: Mounting NFS shared folders...
==> default: Pruning invalid NFS exports. Administrator privileges will be required...
==> default: Removing domain...
==> default: Deleting the machine folder
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

mount -o vers=3,udp /vagrant

Stdout from the command:

Stderr from the command:

mount.nfs: requested NFS version or transport protocol is not supported

I have opened ports 111 2049 20048 32765 and 32803 for NFS in the firewall, still this fails. I do not know what I am doing wrong! I appreciate any help!

Ok, I kinda solved the issue.

  config.vm.synced_folder ".", "/vagrant", type: "nfs"


  config.vm.synced_folder ".", "/vagrant", type: "nfs", mount_options: ["vers=3,tcp"]

Makes it work, I however do not understand why! If anyone can make me understand I would be glad!