Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failure to mount HGFS - VMware/vagrant-vmware-fusion #9004

Closed
ghost opened this issue Sep 27, 2017 · 19 comments
Closed

Failure to mount HGFS - VMware/vagrant-vmware-fusion #9004

ghost opened this issue Sep 27, 2017 · 19 comments

Comments

@ghost
Copy link

ghost commented Sep 27, 2017

Please note that the Vagrant issue tracker is reserved for bug reports and
enhancements. For general usage questions, please use the Vagrant mailing list:
https://groups.google.com/forum/#!forum/vagrant-up. Thank you!

Vagrant version

Vagrant 2.0.0

Vagrant Plugins

vagrant-share (1.1.9, system)
vagrant-vmware-fusion (4.0.24)

Host operating system

macOS 10.12.6 (16G29)

VMWare Fusion Pro

Professional Version 8.5.8 (5824040)

Guest operating system

centos/7

Vagrantfile

Vagrant.configure("2") do |config|
  config.vm.box = "centos/7"
  config.vm.synced_folder "/tmp", "/vagrant_data"
end

Debug output

https://gist.github.com/bryanhuntesl/37cee786bfb43de22389299a41d59f1a

Expected behaviour

Should have mounted the /tmp directory into the VM

Actual behaviour

Timeout during HGFS mounting

Steps to reproduce

  1. Create same setup
  2. vagrant up
  3. fail

References

Are there any other GitHub issues (open or closed) that should be linked here?
For example:

Question/Resolution

is this just a known issue with VMWare? If so I'm happy to just dump them and use VirtualBox (despite paying for license, and your plugin). I just don't want to waste time trying to get it to work if it never will.

@chrisroberts
Copy link
Member

@bryanhuntesl Would you please try this with a bento centos box and see if you still experience the same failure. Thanks!

@ghost
Copy link
Author

ghost commented Oct 3, 2017

Thanks @chrisroberts - works perfectly on the first run with the following using VMware Fusion:

  • "bento/centos-7.2"
  • "bento/debian-9"

However, on 'vagrant reload' it loses it's grasp, and produces the following error message:

An error occurred while executing `vmrun`, a utility for controlling
VMware machines. The command and output are below:

Command: ["enableSharedFolders", "/esl/bryan-vagrant/centos-vmware/.vagrant/machines/default/vmware_fusion/97be2017-2819-4825-8f24-fc70ddfc5792/centos-7.2-x86_64.vmx", {:notify=>[:stdout, :stderr]}]

Stdout: Error: There was an error mounting the Shared Folders file system inside the guest operating system

Stderr: 

The VM is started regardless.

@ghost
Copy link
Author

ghost commented Oct 3, 2017

New (Centos) Vagrantfile is:

Vagrant.configure("2") do |config|
  config.vm.box = "bento/centos-7.2"
  config.vm.network "forwarded_port", guest: 8080, host: 8080, auto_correct: true
  config.vm.network "forwarded_port", guest: 8098 , host: 8098 , auto_correct: true
end

@ghost
Copy link
Author

ghost commented Oct 3, 2017

It's not that huge a deal, I mostly need the shared folder on the first run, I'm getting stuff configured this time, and most I can get done before restarting the VM - rebuilding is a bit costly (bandwidth/time) though - so anything I can do not to have to rebuild the VM is a plus.

@ghost
Copy link
Author

ghost commented Oct 4, 2017

Same thing again, started from scratch, it fails any time I restart an instance with vagrant reload or vagrant halt && vagrant reload

==> default: Enabling and configuring shared folders...                                               
An error occurred while executing `vmrun`, a utility for controlling
VMware machines. The command and output are below:

Command: ["enableSharedFolders", "/esl/bryan-vagrant/centos-vmware/.vagrant/machines/default/vmware_fusion/00acb3db-a04d-4fff-845d-d92db3a5bb04/centos-7.2-x86_64.vmx", {:notify=>[:stdout, :stderr]}]

Stdout: Error: There was an error mounting the Shared Folders file system inside the guest operating system

Stderr: 

@chrisroberts
Copy link
Member

I wonder if the daemon is not getting started on the guest for some reason. I'll see if I can get a local repro.

@jhogendorn
Copy link

I'm also experiencing this.

@chrisroberts
Copy link
Member

I have been able to reproduce this on occasion depending on the box in use. I have found the underlying cause seems to be VMware attempting to auto updated the vmware tools on the guest. Modifying the VMX settings to disable the automatic upgrade has seemed to resolve the issue. Can you try adding the following vmx config entry and see if it help:

Vagrant.configure("2") do |config|
  config.vm.provider "vmware_fusion" do |vmware|
    vmware.vmx["tools.upgrade.policy"] = "manual"
  end
end

Cheers!

@ghost
Copy link
Author

ghost commented Mar 27, 2018

I haven't used vagrant in ages, I'm seeing this message now :

~/Desktop/vagrant-issues-9004 master* ⇡
❯ vagrant up 
Your license to use 'vagrant-vmware-fusion' hasn't been verified in
months. We'll attempt to verify it now. This requires an internet
connection. If the verification fails, you'll need to connect to the
internet. If verification continues to fail, please contact support
at support@hashicorp.com
Vagrant hasn't been able to verify your usage of 'vagrant-vmware-fusion' in
over two weeks. Please connect to the internet to allow Vagrant to verify
your license. If you don't verify the license within 4 to 6 weeks, you will
be locked out.
Vagrant hasn't been able to verify your usage of 'vagrant-vmware-fusion' in
over two weeks. Please connect to the internet to allow Vagrant to verify
your license. If you don't verify the license within 4 to 6 weeks, you will
be locked out.

That's unhelpful.

My new Vagrantfile is :

Vagrant.configure("2") do |config|
  config.vm.box = "centos/7"
  config.vm.synced_folder "/tmp", "/vagrant_data"
  config.vm.provider "vmware_fusion" do |vmware| 
      vmware.vmx["tools.upgrade.policy"] = "manual"
  end
end

@briancain
Copy link
Member

@bryanhuntesl - Please upgrade your vmware plugin. It should resolve the license message you're seeing. Thanks!

@ghost
Copy link
Author

ghost commented Apr 6, 2018

Hi @briancain - thanks for the tip. The license message was resolved, but for some reason (probably unrelated) my Vagrant installation has gone to hell. I'm on other stuff at the moment (just wanted to spin up a machine to test some Ansible pull requests) so I'm going to park this ticket for the time being. Thanks for looking into it. I'm going to close the ticket for now. I'll open a fresh ticket after a fresh install/configuration.

@ghost ghost closed this as completed Apr 6, 2018
@jeffparsons
Copy link

Vagrant has detected that the VMware plugin is not properly setup.

@bryanhuntesl As in... "Vagrant has detected that the VMware plugin is not properly setup."? That's what I'm seeing after attempting to upgrade Vagrant and the Vagrant VMware plugin.

For me, running vagrant plugin expunge -f made things work again; it reinstalled everything in a way that got Vagrant out of its stuck state and allowed the license check to complete. (Before that it had mangled a bunch of permissions somehow during the upgrade.)

@ghost
Copy link
Author

ghost commented Apr 16, 2018

Thanks for the tip @jeffparsons - unfortunately it's still got issues. I'm going to remove everything I can find and start from scratch.

❯ vagrant plugin expunge -f                                       

All user installed plugins have been removed from this Vagrant environment!

❯ vagrant plugin list
vagrant-share (1.1.9, system)

❯ vagrant plugin update
Updating installed plugins...
Bundler, the underlying system Vagrant uses to install plugins,
reported an error. The error is shown below. These errors are usually
caused by misconfigured plugin installations or transient network
issues. The error from Bundler is:

Unable to resolve dependency: user requested 'vagrant-share (> 0)'

@ghost ghost reopened this Apr 17, 2018
@ghost
Copy link
Author

ghost commented Apr 17, 2018

❯ git clone git@github.com:bryanhuntesl/vagrant-bsd-riak.git
Cloning into 'vagrant-bsd-riak'...
remote: Counting objects: 4, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 4 (delta 0), reused 0 (delta 0), pack-reused 0
Receiving objects: 100% (4/4), 4.50 KiB | 1.50 MiB/s, done.

❯ cd vagrant-bsd-riak

❯ vagrant init
A `Vagrantfile` has been placed in this directory. You are now
ready to `vagrant up` your first virtual environment! Please read
the comments in the Vagrantfile as well as documentation on
`vagrantup.com` for more information on using Vagrant.

❯ vagrant up
The provider 'vmware_fusion' could not be found, but was requested to
back the machine 'default'. Please use a provider that exists.

/bryanhuntesl/vagrant-bsd-riak master*
❯ vagrant plugin list
vagrant-share (1.1.9, system)

❯ vagrant plugin install vmware_fusion
Installing the 'vmware_fusion' plugin. This can take a few minutes...


Bundler, the underlying system Vagrant uses to install plugins,
reported an error. The error is shown below. These errors are usually
caused by misconfigured plugin installations or transient network
issues. The error from Bundler is:

Unable to resolve dependency: user requested 'vmware_fusion (> 0)'

❯ vagrant plugin install vagrant-vmware-desktop
Installing the 'vagrant-vmware-desktop' plugin. This can take a few minutes...

Fetching: vagrant-share-1.1.9.gem (100%)
Installed the plugin 'vagrant-vmware-desktop (1.0.2)'!

❯ vagrant plugin license vagrant-vmware-desktop ~/Desktop/license-vagrant-vmware-fusion.lic
Installing license for 'vagrant-vmware-desktop'...
The license for 'vagrant-vmware-desktop' was successfully installed!
❯ vagrant up
Vagrant encountered an error while attempting to load the utility
service key file. This error can occur if the Vagrant VMware Utility
has not yet been installed, or if it was installed incorrectly. If
this error persists after running the Vagrant VMware Utility installer
again, please contact support at: support@hashicorp.com

Information about the Vagrant VMware Utility, including installation
instruction, can be found here:

  https://www.vagrantup.com/docs/vmware/vagrant-vmware-utility.html

  Path:  /opt/vagrant-vmware-desktop/certificates/vagrant-utility.client.crt
  Error: No such file or directory @ rb_sysopen - /opt/vagrant-vmware-desktop/certificates/vagrant-utility.client.crt

I then installed the downloadable vagrant-vmware-utility

❯ vagrant up
Bringing machine 'default' up with 'vmware_fusion' provider...
==> default: Box 'base' could not be found. Attempting to find and install...
    default: Box Provider: vmware_desktop, vmware_fusion, vmware_workstation
    default: Box Version: >= 0
==> default: Box file was not detected as metadata. Adding it directly...
==> default: Adding box 'base' (v0) for provider: vmware_desktop, vmware_fusion, vmware_workstation
    default: Downloading: base
An error occurred while downloading the remote file. The error
message, if any, is reproduced below. Please fix this error and try
again.

Couldn't open file /bryanhuntesl/vagrant-bsd-riak/base

❯ vagrant provision
==> default: VM not created. Moving on...
/Users/bryanhunt/.vagrant.d/gems/2.3.4/gems/vagrant-vmware-desktop-1.0.2/lib/vagrant-vmware-desktop/checkpoint_client.rb:134:in `block in check_plugin': undefined method `report_on_exception=' for #<Thread:0x000001028b2ba0> (NoMethodError)

❯ vagrant provision
==> default: VM not created. Moving on...
/Users/bryanhunt/.vagrant.d/gems/2.3.4/gems/vagrant-vmware-desktop-1.0.2/lib/vagrant-vmware-desktop/checkpoint_client.rb:134:in `block in check_plugin': undefined method `report_on_exception=' for #<Thread:0x0000010095d7a0> (NoMethodError)

So the final exception after going through that process is :

 `block in check_plugin': undefined method `report_on_exception=' for #<Thread:0x0000010095d7a0> (NoMethodError)


@ghost
Copy link
Author

ghost commented Apr 17, 2018

Hmm. I just checked the Ruby version :

❯ ls -la $( which ruby )
lrwxr-xr-x  1 bryanhunt  admin  31 20 Mar 11:51 /usr/local/bin/ruby -> ../Cellar/ruby/2.5.0_2/bin/ruby

Will switch to system ruby and try again.

@chrisroberts
Copy link
Member

chrisroberts commented Apr 24, 2018

@bryanhuntesl Updating to a recent Vagrant release will remove the undefined method warnings you are receiving.

In the commands you show above, the initial vagrant up command is failing, so subsequent provision commands will not be successful as the guest has not yet been created. The error message shown (Couldn't open file /bryanhuntesl/vagrant-bsd-riak/base) indicates that your Vagrantfile is probably not configured correctly. Updating the box configuration should resolve the vagrant up failure.

Cheers!

@chrisroberts
Copy link
Member

Hey there,

I am going to close this due to lack of response. If this is still occurring, please open a new issue and follow the provided issue template that appears when you click the "New Issue" button. This will help us in getting a reproduction and fix. Thanks! 😄

@vincenzoraco
Copy link

Sorry for commenting on this closed issue but the fix that I had to do was:

sudo chmod -R 777 /opt/vagrant-vmware-desktop

Giving permission to it, will fix the problem

@ghost
Copy link

ghost commented Mar 29, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Mar 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants