hashicorp / vagrant

Vagrant is a tool for building and distributing development environments.
https://www.vagrantup.com
Other
26.18k stars 4.43k forks source link

VMware Plugin 5.0.1 doesn't find VMware Fusion if it's not in /Applications (VAGRANT_VMWARE_FUSION_APP is ignored) #9119

Open mjturner opened 6 years ago

mjturner commented 6 years ago

I've upgraded Vagrant to 2.0.0, the vagrant-vmware-fusion plugin to 5.0.1 and VMware Fusion to 10.x and Vagrant can no longer find VMware as it's not installed in /Applications. It appears as if the VAGRANT_VMWARE_FUSION_APP environment variable is being ignored. Earlier versions of the plugin also displayed a more meaningful error message indicating that VMware couldn't be found.

My configuration worked fine with Vagrant < 2.0 and VMware 8.x.

Vagrant version

Vagrant 2.0.0 (vagrant-vmware-fusion 5.0.1 plugin)

Host operating system

macOS 10.12.6

Guest operating system

N/A

Vagrantfile

N/A

Debug output

https://gist.github.com/mjturner/a33bb93e41853d85da6f0514eec2da33

Expected behavior

Vagrant should start

Actual behavior

Running vagrant displays the following error is displayed:

Vagrant failed to initialize at a very early stage:

Vagrant has detected that the VMware plugin is not properly setup. Please reinstall the VMware plugin and run this command again. If this error persists please contact support.

Reinstalling the plugin doesn't solve the issue.

Debug output shows the following line:

DEBUG subprocess: stderr: Setup failure encountered: Failed to locate VMware installation directory!

I have the $VAGRANT_VMWARE_FUSION_APP environment variable set:

$ echo $VAGRANT_VMWARE_FUSION_APP
/Custom Applications/VMware Fusion.app

The same setup worked with earlier versions of Vagrant and the VMware Fusion Plugin (and is still documented as supported). Creating a symlink into /Applications solves the issue and Vagrant runs as normal.

Steps to reproduce

  1. Install Vagrant 2.0, and vagrant-vmware-fusion plugin
  2. Install VMware Fusion 10.x in a directory other than /Applications
  3. Set the VAGRANT_VMWARE_FUSION_APP environment variable as per the Vagrant documentation.
  4. Run vagrant

References

mathewpeterson commented 6 years ago

I am also experiencing this issue.

kikitux commented 6 years ago

Hello

Vagrant will check on the default path for the installer, this is by design.

We will be updating the documentation to reflect this.

Basically the installer goes to /Applications, and the plugin check there.