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

VMware provider HGFS shared folders broken due to unnecessary kernel module requirement using open-vm-tools 10.x #6775

Closed
ironcladlou opened this issue Jan 1, 2016 · 59 comments

Comments

@ironcladlou
Copy link

Using VMware 8.1.0 (3272237) and Fedora 23 guest with open-vm-tools-10.0.0-7.fc23.x86_64, the HGFS kernel module is not present (nor is it required) for shared folder functionality (because it's now a userspace FUSE implementation).

Nevertheless, the vagrant vmware_fusion provider will try (and fail) to detect the HGFS kernel module when using shared folders.

As far as I can tell, this means HGFS shared folders simply don't work with the latest VMware/vagrant/Fedora without trying to install the "legacy" VMware tools package (which is not recommended and shouldn't be necessary).

I'm not sure if this is the right place to report issues with the VMware provider; if there's a separate tracker, please let me know.

@gtirloni
Copy link

I'm experiencing the same issue with VMware Workstation 12.1 Pro on Windows 10 64-bit with Vagrant 1.8.1 and a Fedora 23 box.

The vmhgfs kernel module has been deprecated in favor of a FUSE filesystem. I believe Vagrant shouldn't look for this kernel module anymore, as even installing VMtools from the ISO won't install the module.

The vmtoolsd service takes care of initiating the vmhgfs-fuse client to mount the shared folders.

@sykesm
Copy link

sykesm commented Mar 18, 2016

fwiw, I'm running into this issue as well. I'd very much like to see this resolved in the vmware plugin.

@bovi
Copy link

bovi commented Apr 3, 2016

same here. it should at least be possible to de-activate the kernel module check for vmhgfs which isn't necessary anymore today.

@StefanScherer
Copy link
Contributor

Is there a any news when this will be fixed in the vagrant-vmware-fusion plugin? I'm using version 4.0.8

@khromov
Copy link

khromov commented Apr 6, 2016

Same issue... Running vmware-config-tools.pl inside the VM and answering yes to this question makes it possible to move forward with HGFS detection.

The VMware Host-Guest Filesystem allows for shared folders between the host OS 
and the guest OS in a Fusion or Workstation virtual environment.  Do you wish 
to enable this feature? [yes] 

You can also not do this through Vagrantfile because the process aborts before provisioners are run....

@kikitux
Copy link
Contributor

kikitux commented Apr 6, 2016

from other issue, seems this works:

https://gist.github.com/vadviktor/5aa034bbee6e53d26b70

@bovi
Copy link

bovi commented Apr 7, 2016

@kikitux this is not a solution as the problem isn't the shared folder. the shared folder works for everyone but it does not use the kernel modul. vagrant on the other side seems not to properly check the shared folder funtionality but the existence of the kernel module which is already deprecated since several years.

@tzvetkoff
Copy link
Contributor

At some point VMware changed the tools package and moved HGFS to FUSE instead of being in the kernel.
So far I'm working around this using NFS shares, but since we're paying for the VMware provider support, I'd like to see this fixed.

@ggeldenhuis
Copy link

It would be fantastic to get an update on this as it is really useful functionality that is missing. I can confirm the same behaviour for Ubuntu 14.04.4 using kernel 4.2.0-27.

@nickcharlton
Copy link

I'm building my boxes with an older Ubuntu 14.04.03 ISO to work around this issue. This has the 3.19 kernel version rather than the 4.2.0 series of the later builds. Hopefully those links can help someone else out.

It seems like the best fix would be to follow the direction VMware are going and remove the check on HGFS.

@juvenal
Copy link

juvenal commented Apr 20, 2016

This is a real problem to me, as much of the development that I need to do involves Fedora 23 / 24 Alpha. I was using vagrant for a long time, I bought the vmware plugin from Hashcorp to be assured that problems like this should be solved quickly...
@mitchellh, please inform us about a possible plan to solve this...
Thanks.

@dragon788
Copy link
Contributor

Also running into this issue, its possible to work around by installing the legacy vmware tools kernel module, but not very user friendly and a step backwards in functionality.

@111a5ab1
Copy link

111a5ab1 commented May 1, 2016

This issue was opened on Jan 2, and currently has no milestone or assignee. This is a bit disappointing as the VMware plugin is a licensed product costing $79 per seat. Any ETA or progress on resolving this so that share folders work correctly with: config.vm.synced_folder ".", "/vagrant"?

@wyaeld
Copy link

wyaeld commented May 7, 2016

@sethvargo we need some sort of communication or eta on this. Vagrant is a pretty important part of a lot of our workflows, even more so when using certain platforms cough vmware which don't have the developer ease of use.

I realize vagrant is a very complex codebase, and people have competing priorities, but there are too many issues and PRs sitting around with no maintainer input.

@choco
Copy link

choco commented May 30, 2016

This is getting ridiculous, almost 5 months without any sign of a fix on the way.... What's worse no communication either.

@tomislav
Copy link

Yeah, I was told by Hashicorp support to use old boxes and not to even use the latest VMware Fusion because it had some kind of networking bug... and they continue to sell the plugin. I got into the Docker for Mac beta and looking into using that to replace my Vagrant workflow.

@bovi
Copy link

bovi commented May 30, 2016

@tomislav was that really an official answer from hashicorp to not use the latest vmware fusion version??? that is hilarious due to the reason that they usually come out with a new vmware plugin for supporting new versions but without any additional features.

on the other side you get open source attitude, with shareware prices and closed software quality. the best from all words 💩😷

@tomislav
Copy link

Thanks for your email.

Per the log, it seems the HGFS module is not present on the VM.

Can you please test with hashicorp/precise64 box ?

As today Vagrant requires the HGFS module for be able to mount the shared folders.

Additionally, there is a VMWare fusion issue with 8.1.* and forwarded ports, if you hit issues that Vagrant can't connect on the 22nn port, please try to go to Fusion 8.0.2 since thats the last one known to work without issues.

@gtirloni
Copy link

There is no HGFS module with latest VMware versions anymore. That's the point.

Agreed this is open source attitude, shareware prices and proprietary software quality. This sucks. I've paid for the Vmware plugin and I'm back to VirtualBox. This sucks, I'm so frustrated.

@rmoriz
Copy link

rmoriz commented May 30, 2016

I understand, that Hashicorp now focuses on enterprise products, that VMWare is not very cooperative and "recent" changes introduce a lot of issues that need to be addressed.

IMHO there are two+ options:

  • fix it, hire people to fix it
  • discontinue the product, release the existing plugin as OSS so people can contribute without having to reverse engineer the ruby encoder obfuscated code and become criminals…
  • something better

So, @mitchellh what's your decision?

@khromov
Copy link

khromov commented Jun 1, 2016

If /mnt/hgfs needs to be created, perhaps the VMWare Fusion / Workstation plugins can create it automatically? Otherwise it sounds like it might be a breaking change for a lot of boxes that don't have this folder.

@bovi
Copy link

bovi commented Jun 1, 2016

Wow, ok something happened.

I can confirm that version 4.0.9 is working with a fresh installed Ubuntu 16.04 and open-vm-tools. This is new and wasn't proper booting and using the shared folder function before. The only gotcha I notice is, that this is not working with the actual vmware-tools (the ones provided together with the VMWare Software). This is not a deal-breaker at all, as VMWare nevertheless suggests to use the open-vm-tools of the distribution. The other gotcha is, that you have to manually create /mnt/hgfs (as already mentioned before).

So, even if it took some time. Thanks for fixing this issue Hashicorp! This helps me actually a lot to move some of my projects to a more recent linux version.

@111a5ab1
Copy link

111a5ab1 commented Jun 1, 2016

@cbednarski Thanks for the clarification, its good that /mnt/hgfs is nothing more than prerequisite that it exists. I do like the suggestion by @khromov that maybe the plugin can create this directory if it doesn't already exists. I'm still trying to figure out why its hanging with Arch; is there any debugging option I can turn on or logs I can have a look at to see what is happening?

@StefanScherer Cheers, but I'm running on OSX with Fusion. You mentioned you were able to get the plugin working in OSX with boxcutter/ubuntu1404. Can you provide details for that OS? Did you generate the Vagrant box via packer, or is there a pre-built Vagrant box you grabbed from somewhere? I didn't see a pre-built image; not sure if I missed it or if it just needs to be built from Packer. Seeing if the plugin works with boxcutter/ubuntu1404 on my system will help determine if my system is just borked, or if its an issue specific to the packer Arch build.

@StefanScherer
Copy link
Contributor

@111a5ab1 Just type in the command, it will work on your machine as well :-)

The boxcutter/ubuntu1404 is available in Atlas by HashiCorp and you just can run vagrant init boxcutter/ubuntu1404; vagrant up --provider vmware_fusion, it will download the box and spin it up.

The packer configs are available at their GitHub repo boxcutter/ubuntu, and there are other platforms as well.

@111a5ab1
Copy link

111a5ab1 commented Jun 1, 2016

@StefanScherer As yes, thanks. Your earlier link to Github threw me off, I was looking on there thinking thats where the Vagrant box was suppose to be and couldn't find it. The HGFS ran just fine with Ubuntu; however I couldn't find the "open-vm-tools" package installed and it looks like based on the file system and the doco that it's running VMware tools, and not open-vm-tools:

VMware Tools 10.0.5
https://atlas.hashicorp.com/boxcutter/boxes/ubuntu1404

However @bovi found version 4.0.9 is working with a fresh installed Ubuntu 16.04 and open-vm-tools, but not the VMware tools which seems to the opposite of the 14.04 box. So I'll start trying to have a closer look at why the plugin seems to be failing with Arch Linux and open-vm-tools; which might be difficult given its closed source.

@cbednarski I am able to manually mount file shares in my Packer built Arch Vagrant box using vmhgfs-fuse, so that leads me to believe its an issue with the plugin still and not my build.

@mitchellh
Copy link
Contributor

For all, @cbednarski is spot on for why /mnt/hgfs needs to exist.

As others have said, it is possible in the future for the plugin to create this for you. I just wanted to make sure to get a release out as quick as possible that can get people working again on these platforms. If you run into any other issues please let me know.

@StefanScherer
Copy link
Contributor

@111a5ab1 Yes I also wonder why the boxcutter/ubuntu1404 works with VMware Tools installed instead of open-vm-tools. But it's probably better to switch over to the open-vm-tools, I've opened boxcutter/ubuntu#66 and send a PR if I find some time for it.

@cbednarski
Copy link
Contributor

cbednarski commented Jun 1, 2016

Otherwise it sounds like it might be a breaking change for a lot of boxes that don't have this folder.

@khromov This is not a breaking change because this is new functionality. If your box does not support this then shared folders will not be enabled. They would not have been enabled before either.

The only gotcha I notice is, that this is not working with the actual vmware-tools (the ones provided together with the VMWare Software).

@bovi This is because of a bug in the vmware tools installer which does not correctly identify newer kernels. There is a workaround which consists of installing open-vm-tools and then also using the proprietary vmware tools installer.

Fortunately you don't need to do this anymore. You do, however, have to identify whether you should use the proprietary VMware tools installer or open-vm-tools. Try open-vm-tools first since newer kernels will support this. (Potentially any kernel after 3.10, 4.* for sure.)

... with Arch Linux and open-vm-tools; which might be difficult given its closed source.

@111a5ab1 open-vm-tools is completely open source and is maintained by VMware. IIRC the FUSE driver is in the linux kernel source tree (maybe other parts, too). If there is a problem with open-vm-tools in a particular distro, try their issue tracker or mailing lists.

Yes I also wonder why the boxcutter/ubuntu1404 works with VMware Tools installed instead of open-vm-tools.

@StefanScherer The previous plugin version's support for HGFS via kernel module (instead of FUSE) was not removed, and is still tried first. If your box worked with HGFS before it will continue working with HGFS with the 4.0.9 plugin.

@111a5ab1
Copy link

111a5ab1 commented Jun 2, 2016

@cbednarski Hi Mate, my comment about closed source was in reference to the Vagrant VMware plugin. i.e. it was hard to troubleshoot and debug why it was hanging for me when I couldn't see the source code to follow what it was doing.

@cbednarski @mitchellh
I've identified why the plugin was not working on my Arch box. Apparently installing open-vm-tools package via pacman does not set the vmtoolsd service to start upon boot; it has to be manually turned on [:rolls eyes:].

I discovered this by using the vmrun command-line tool:
% /Applications/VMware\ Fusion.app/Contents/Library/vmrun -T fusion addSharedFolder ./1464757726.vmx cmdTest /Users, which after a short period timed out with Error: The VMware Tools are not running in the virtual machine. The enableSharedFolders option also responded the same way. So it appears the vmrun command depends on vmtoolsd running in the Guest OS.

However, strangely through the GUI you can check "Enable Shared Folders" and manually add a shared folder to the list, and then mount with vmhgfs-fuse without vmtoolsd running. ¯\_(ツ)_/¯

Unfortunately, with the VMware plugin it just seemed to hang for ever and I never got any error message. That combined with scratching my head why I could manually mount folders gave me the impression it was an issue with the plugin still. Maybe you can add a timeout and a friendly reminder message asking the user if the vmtoolsd tools daemon is running?

Thanks for getting the plugin sorted, and for putting up with the "it doesn't work for me" while I tried to figure it out :)

@ksquaredkey
Copy link

ksquaredkey commented Jun 16, 2016

4.0.9 is not working for me. Fusion 8.1.1 Pro, Vagrant 1.8.4, fusion plugin 4.0.9, Guest OS CentOS 6.6 box I built in December from Fusion 8.0.x Pro. I tried running the vmhgfs-fuse my self and got exit code 255.

` default: Waiting for HGFS to become available...
==> default: Enabling and configuring shared folders...
default: -- /Users/key/Dev/Stash/Server-stuff/cortext-dev-tools/vm: /vagrant
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

vmhgfs-fuse -o uid=id -u vagrant,gid=500,allow_other '.host:/-vagrant' /vagrant

Stdout from the command:

Stderr from the command:

`

@cbednarski
Copy link
Contributor

@ksquaredkey Since you are having a different problem, please open a new issue so we can follow up. It's hard to keep track of a convo in a closed thread. Thanks!

@ghost
Copy link

ghost commented Sep 26, 2017

This is a long discussion. What I'd like to know is, have architecture changes in Vmware Fusion (Pro) and/or the underlying distro made the vagrant-vmware-fusion plugin untenable.

If so, I'll just dump VMware and just use Virtualbox (despite the fact it crashes my kernel) - time is life.

$ vagrant plugin list
vagrant-share (1.1.9, system)
vagrant-vmware-fusion (4.0.24)

vmware - Professional Version 8.5.8 (5824040)
Centos CentOS Linux release 7.3.1611 (Core)

@khromov
Copy link

khromov commented Sep 26, 2017

@bryanhuntesl It works fine, but your mileage may vary depending on which box you choose. The issue discussed here affects only certain boxes. We've been running VMWare Fusion + Vagrant on a large project for over a year now and it's been working fine (and much faster than VBox).

@ghost
Copy link

ghost commented Mar 31, 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 31, 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