gael-ian / vagrant-bindfs

A Vagrant plugin to automate bindfs mount in the VM
MIT License
482 stars 37 forks source link

Unable to get bindfs running on OSX guest with Ubuntu host #49

Closed mark-veenstra closed 8 years ago

mark-veenstra commented 8 years ago

I can't get the bindfs plugin working with a OSX guest based on the jhcook/osx-elcapitan-10.11 box from HashiCorp.

I have configured the NFS and the bindfs as follows:

  config.vm.synced_folder ".", "/vagrant-nfs", type: "nfs", mount_options: ['rw', 'vers=3', 'udp', 'actimeo=2', 'resvport', 'fsc', 'nolock', 'noatime'] 
  config.bindfs.bind_folder "/vagrant-nfs", "/vagrant", after: :provision

Above works great on all systems as long as the guest OS isn't OSX. I also tried and installed brew cask install osxfuse and brew install homebrew/fuse/bindfs on the guest, but even then I get the same error. What can I do to get bindfs working in this setup?

Vagrant attempted to execute the capability 'bindfs_installed'
on the detect guest OS 'darwin', 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.
gael-ian commented 8 years ago

Hi Mark,

OS X is not supported in vagrant-bindfs for the moment. I didn't even notice it was now legal to virtualize OS X instances. When did that happened ?

I'll look in the next week to try to add OS X support and solve your problem.

Thanks for reporting

gael-ian commented 8 years ago

Ok, I give up. I try to download the jhcook/osx-elcapitan-10.11 box from HashiCorp since yesterday evening without being able to complete. The box is pretty fat (as I could have expected for an OS X one) and the connexion here can't handle it.

You'll have to wait until I find a better connexion but I'm only moving in two weeks. I pushed the changes in the osx-support branch if you want to test them but I won't release anything before being able to test it myself.

Sorry for waiting and thanks for your patience...

mark-veenstra commented 8 years ago

I will give a try on the osx-branch and see if I can figure it out. I could also grab the box jhcook/osx-elcapitan-10.11 from HashiCorp for you and host it somewhere else (hopefully better connection than), let me know if this is necessary.

gael-ian commented 8 years ago

I'm not sure hosting the box somewhere else will help but I would be happy to see some result of your tests on the osx-support branch. It should work, except if fuse as to be loaded in a specific way as on Ubuntu.

Thanks you

mark-veenstra commented 8 years ago

Well I am happy to try it out, but I am not a Ruby programmer nor have a setup the environment before. So I gave it a try, but:

myuser@my-laptop:~/Documents/Projects/vagrant-bindfs$ bundle install
Your Gemfile lists the gem vagrant-bindfs (>= 0) more than once.
You should probably keep only one of them.
While it's not a problem now, it could cause errors if you change the version of just one of them later.
Updating https://github.com/mitchellh/vagrant.git
Fetching gem metadata from https://rubygems.org/............
Fetching version metadata from https://rubygems.org/.b..
Fetching dependency metadata from https://rubygems.org/.
Resolving dependencies...
Bundler could not find compatible versions for gem "bundler":
  In Gemfile:
    vagrant (>= 0) ruby depends on
      bundler (= 1.12.5) ruby

  Current Bundler version:
    bundler (1.10.6)
This Gemfile requires a different version of Bundler.
Perhaps you need to update Bundler by running `gem install bundler`?
Could not find gem 'bundler (= 1.12.5) ruby', which is required by gem 'vagrant (>= 0) ruby', in any of the sources.

I did run the gem install bundler and it installs the 1.13.0 version. But the old version also still remains and the error does still appear.

myuser@my-laptop:~/Documents/Projects/vagrant-bindfs$ gem list bundler

*** LOCAL GEMS ***

bundler (1.13.0, 1.10.6)
gael-ian commented 8 years ago

You can install a specific version of a gem with gem install bundler --version=1.12.5 Maybe you'll have to uninstall bundler before to not have any problems with the 1.13.0 version: gem uninstall bundler

Thanks for testing

mark-veenstra commented 8 years ago

Like I said I am not keen with Ruby and can't seem to test it:

myuser@mylaptop:~/Documents/Projects/vagrant-bindfs$ bundle install
Your Gemfile lists the gem vagrant-bindfs (>= 0) more than once.
You should probably keep only one of them.
While it's not a problem now, it could cause errors if you change the version of one of them later.

[!] There was an error parsing `Gemfile`: You cannot specify the same gem twice coming from different sources.
You specified that vagrant-bindfs (>= 0) should come from source at `.` and source at `.`
. Bundler cannot continue.

 #  from /home/myuser/Documents/Projects/vagrant-bindfs/Gemfile:16
 #  -------------------------------------------
 #    # position while developing it.
 >    gem "vagrant-bindfs", path: "."
 #  
 #  -------------------------------------------
gael-ian commented 8 years ago

I changed the gem specification and Gemfile for development to work around this issue. You should be able to install it now.

I'll post more informations later today or at worse tomorrow, as I'm back in a more connected area.

gael-ian commented 8 years ago

Definitely, public internet connections here are not made to download a huge image like an OS X box. Or OS X images are too huge to be useful as VM...

I may be luckier next week in another accommodation but for now it already cost me way too much time (, money) and effort to go further. Sorry.

gael-ian commented 8 years ago

vagrant-bindfs now support OS X guests in its new 0.4.10 release!