Mac OS 10.8 NFS synced_folder and private_network

287 views
Skip to first unread message

Roberto Bouza

unread,
Apr 26, 2013, 5:38:17 PM4/26/13
to vagra...@googlegroups.com
Hello,

I'm running into this problem were I spin up multiple VMs and the last one is the only one that gets my synced_folder NFS mount (only when I run a private_network), all the other ones
get permission denied because of the /etc/exports file.

Here is the Vagrantfile info:

--- Vagrantfile ---
    # Machine level settings
    #
    config.vm.synced_folder "/Users/user", "/home/user", :nfs => true

    #
    # Enabling VMware GUI
    #
    #config.vm.provider "vmware_fusion" do |v|
    #  v.gui = true
    #end

    %w(machine1 machine2 new).each do |name|
      config.vm.define name do |named_vm|
        named_vm.vm.hostname = name
        #named_vm.vm.synced_folder "/Users/user", "/home/user", :nfs => true (I tried this also)
          named_vm.vm.provider :vmware_fusion do |v|
            #v.vmx["memsize"] = 2048
            #v.vmx["numvcpus"] = 1
            #v.vmx["cpuid.coresPerSocket"] = 1
            #v.vmx['vpmc.enable'] = 'TRUE'
            v.vmx["displayName"] = name
            #v.vmx["annotation"] = "comment"
            v.vmx["vhv.enable"] = "TRUE" #IMPORTANT: edit the VM's VMX file to support x64 nested VMs (vInception: VMs within VMs)
          end
      end
    end

    config.vm.define :new do |new|
      new.vm.network :private_network, ip: "10.10.10.10"
    end

    config.vm.define :machine1 do |machine1|
      keystone.vm.network :private_network, ip: "10.10.10.11"
    end

    config.vm.define :machine2 do |machine2|
      glance.vm.network :private_network, ip: "10.10.10.12"
    end
--- Vagrantfile END ---

My exports file looks like this:

$> cat /etc/exports
# VAGRANT-BEGIN: /Users/user/Vagrant/.vagrant/machines/machine2/vmware_fusion/vm.vmwarevm
"/Users/user" 10.10.10.12 -mapall=501:20
# VAGRANT-END: /Users/user/Vagrant/.vagrant/machines/machine2/vmware_fusion/vm.vmwarevm

--------

Any help is appreciated.

Thank you!

Roberto Bouza

unread,
Apr 29, 2013, 1:43:51 PM4/29/13
to vagra...@googlegroups.com
Ok,

So I narrow this down to the NFS pruning section.

If you have two VMs up and running, you start one first the /etc/exports gets updated correctly. Now when the second one goes up the list of valid_ids doesn't contain all the current VMs running but rather the only one you are starting this causes the removal of old entries.

Here is an excerpt of the INFO logs:
---
INFO bsd: Pruning invalid NFS entries...
INFO interface: info: Pruning invalid NFS exports. Administrator privileges will be required...
Pruning invalid NFS exports. Administrator privileges will be required...
INFO bsd: Invalid ID, pruning: /Users/user/Vagrant/.vagrant/machines/machine1/vmware_fusion/vm.vmwarevm
---

Machine 1 is a live running machine and its export is getting pruned.

I may be doing something wrong but at least that is what I got so far.

Mitchell Hashimoto

unread,
Apr 30, 2013, 1:58:02 PM4/30/13
to vagra...@googlegroups.com
Roberto,

I just pushed a new version of the Fusion gem (0.6.3) that fixes this issue. Thanks for finding this bug!

Best,
Mitchell


--
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Roberto Bouza

unread,
Apr 30, 2013, 2:15:48 PM4/30/13
to vagra...@googlegroups.com
Awesome Mitchell!

Thanks for this!
Reply all
Reply to author
Forward
0 new messages