hashicorp / vagrant

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

"Failed attempting to check VMware version" error if ubuntu-desktop package is not installed #10816

Open clong opened 5 years ago

clong commented 5 years ago

Vagrant version

Vagrant 2.2.4 w/ vagrant-vmware-desktop 2.0.3

Host operating system

Ubuntu 16.04

Guest operating system

N/A

Vagrantfile

N/A

Debug output

https://gist.github.com/clong/fafa84443816cfe33bfe6726e4149cf7

Expected behavior

Running vagrant status should report:

This environment represents multiple VMs. The VMs are all listed
above with their current state. For more information about a specific
VM, run `vagrant status NAME`.
Current machine states:

logger                    not created (vmware_desktop)
dc                        not created (vmware_desktop)
wef                       not created (vmware_desktop)
win10                     not created (vmware_desktop)

Actual behavior

I received the following error message:

Vagrant encountered an error while attempting to inspect VMware
for current version information:

  Failed attempting to check VMware version

I was able to work around this by installing ubuntu-desktop, but it seems like this is something that should work without requiring a display.

Steps to reproduce

  1. Install VMware Workstation Pro on Ubuntu 16.04
  2. Install vagrant-vmware-desktop plugin & license it
  3. Install vagrant-vmware-utility
  4. Attempt to vagrant status on any vagrantfile. Receive error message.
  5. apt-get install -y ubuntu-desktop
  6. Vagrant works as expected now.
DanyC97 commented 4 years ago

i've hit the same issue and on a subsequent vagrant ssh it worked ...

a73x7 commented 2 years ago

I ran into this same issue on AlmaLinux 8.4 and I was able to get some better output by calling vagrant-vmware-utility api -debug directly:

[TRACE] vagrant-vmware-utility.api: vmware version check failed:
  output=
  | /usr/lib/vmware/bin/vmware-vmx: error while loading shared libraries: libXtst.so.6: cannot open shared object file: No such file or directory

Installed libXtst and restarted the service, it succeeded and vagrant status displayed as expected!

sudo dnf install libXtst
sudo systemctl restart vagrant-vmware-utility