Can't configure FreeBSD 9.1 box to mount /vagrant via nfs

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Can't configure FreeBSD 9.1 box to mount /vagrant via nfs

Todd Lyons
I have configured a simple FreeBSD 9.1 box with chef-solo.

[farm@mail ~/vagrant/FreeBSD_9.1_64_zfs]$ grep -v '#' Vagrantfile | tr -s '\n'
Vagrant.configure("2") do |config|
  config.vm.box = "FreeBSD_9.1_64_zfs"
  config.vm.synced_folder ".", "/vagrant", :nfs => true, id: "vagrant-root"
  config.vm.provider :virtualbox do |vb|
    vb.customize ["modifyvm", :id, "--memory", "512"]
    vb.customize ["modifyvm", :id, "--nictype1", "virtio"]
  end
  config.vm.provision :chef_solo do |chef|
    chef.cookbooks_path = "../../chef-repo/cookbooks"
    chef.data_bags_path = "../../chef-repo/data_bags"
    chef.roles_path     = "../../chef-repo/roles"
    chef.add_role   "generic"
  end
  config.berkshelf.enabled = true
end

The config.vm.synced_folder is due to a post I found from mitchellh detailing that 1) the mount I specify has to use nfs b/c shared directory isn't supported in freebsd virtualbox tools and 2) it must identify itself as the "vagrant-root".  The problem is that vagrant tries to execute a mount_virtualbox_shared_folder function, which is not available in /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/plugins/guests/freebsd/plugin.rb (and the corresponding freebsd/cap/*).  I was under the assumption that defining the mount as the "vagrant-root" would circumvent the mount_virtualbox_shared_folder function attempt.  But as you can see in the attached debug logfile, it still attempts to do it.  When I do 'vagrant up', I get:

 INFO interface: error: Vagrant attempted to execute the capability 'mount_virtualbox_shared_folder'
on the detect guest OS 'freebsd', but the guest doesn't
support that capability. This capability is required for your
configuration of Vagrant. Please either reconfigure Vagrant to
avoid this capability or fix the issue by creating the capability.

I have attached to this email a DEBUG level output to an up command.  Can anybody spot something in my config or in my debug output that would indicate the proper fix for this?

[farm@mail ~]$ vagrant --version
Vagrant version 1.2.7

...Todd

--
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 

freebsd.log.1 (125K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Can't configure FreeBSD 9.1 box to mount /vagrant via nfs

Todd Lyons
On Friday, August 2, 2013 11:46:33 AM UTC-7, Todd Lyons wrote:
I have configured a simple FreeBSD 9.1 box with chef-solo.

[farm@mail ~/vagrant/FreeBSD_9.1_64_zfs]$ grep -v '#' Vagrantfile | tr -s '\n'
Vagrant.configure("2") do |config|
  config.vm.box = "FreeBSD_9.1_64_zfs"
  config.vm.synced_folder ".", "/vagrant", :nfs => true, id: "vagrant-root"
  config.vm.provider :virtualbox do |vb|
    vb.customize ["modifyvm", :id, "--memory", "512"]
    vb.customize ["modifyvm", :id, "--nictype1", "virtio"]
  end
  config.vm.provision :chef_solo do |chef|
    chef.cookbooks_path = "../../chef-repo/cookbooks"
    chef.data_bags_path = "../../chef-repo/data_bags"
    chef.roles_path     = "../../chef-repo/roles"
    chef.add_role   "generic"
  end
  config.berkshelf.enabled = true
end

The config.vm.synced_folder is due to a post I found from mitchellh detailing that 1) the mount I specify has to use nfs b/c shared directory isn't supported in freebsd virtualbox tools and 2) it must identify itself as the "vagrant-root".  The problem is that vagrant tries to execute a mount_virtualbox_shared_folder function, which is not available in /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/plugins/guests/freebsd/plugin.rb (and the corresponding freebsd/cap/*).  I was under the assumption that defining the mount as the "vagrant-root" would circumvent the mount_virtualbox_shared_folder function attempt.  But as you can see in the attached debug logfile, it still attempts to do it.  When I do 'vagrant up', I get:


I can also add that if I disable the chef-solo configuration, then the machine comes up properly with the vagrant-root nfs mount at /vagrant.  So it would seem that the issue is chef-solo expects the named capability above, but doesn't understand that the nfs mount of id vagrant-root provides it (or hasn't processed that part of the config yet).  Does that provide any further usable info?  Or is it generally known that alternate vagrant-root doesn't work with chef-solo?

...Todd

--
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.