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

Vagrant-vmware-desktop provider error cannot load such file #10644

Open jadilet opened 5 years ago

jadilet commented 5 years ago

Vagrant version

C:\Users\admin\Downloads>vagrant -v
Vagrant 2.2.2

C:\Users\admin\Downloads>vagrant plugin list
vagrant-subutai (7.0.7, global)
vagrant-vbguest (0.17.0, global)
vagrant-vmware-desktop (2.0.3, global)

Host operating system

Windows 10

Guest operating system

Debian stretch

Vagrantfile

# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|
  config.vm.box = "subutai/stretch-master"
end

Debug output

https://gist.github.com/jadilet/975d7786c7569af5276dcd86c3441bd0#file-vagrant-debug-log https://gist.github.com/jadilet/82ecd069aa0fb644ef1823e97ab7ddb1#file-vagrant-debug-box-remove-log

Expected behavior

vagrant global-status --prune command should not be failed after installation the vagrant-vmware-destktop plugin. vagrant box remove BOX_NAME --provider vmware_desktop --all --force command should not be failed after installation the vagrant-vmware-destktop plugin.

Actual behavior

C:\Users\admin\Downloads>vagrant box remove subutai/stretch-master  --provider vmware_desktop --all --force
The plugins failed to load properly. The error message given is
shown below.

cannot load such file -- vagrant/vmware/desktop
C:\Users\admin\Downloads>vagrant global-status --prune
The plugins failed to load properly. The error message given is
shown below.

cannot load such file -- vagrant/vmware/desktop

Steps to reproduce

  1. Install Vagrant plugin(provider) vagrant-vmware-desktop
  2. Install license for the vagrant provider
  3. Execute command: vagrant global-status --prune
chrisroberts commented 5 years ago

Hi there. Please check the version of Vagrant you have installed. If it is the 32-bit version, please re-install using the 64-bit version.

jadilet commented 5 years ago

Hi @chrisroberts, I'm sure it is the 64-bit version. I caught this issue on the Linux too. Here more info:

alpha@alpha-HP-ENVY-15-x360-PC:~/Videos$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.3 LTS
Release:    16.04
Codename:   xenial
alpha@alpha-HP-ENVY-15-x360-PC:~/Videos$ vagrant -v
Vagrant 2.2.2
alpha@alpha-HP-ENVY-15-x360-PC:~/Videos$ vagrant plugin list
vagrant-libvirt (0.0.45, global)
  - Version Constraint: > 0
vagrant-subutai (7.0.10, global)
  - Version Constraint: > 0
vagrant-vbguest (0.17.2, global)
  - Version Constraint: > 0
vagrant-vmware-desktop (2.0.3, global)
alpha@alpha-HP-ENVY-15-x360-PC:~/Videos$ vagrant global-status --prune
The plugins failed to load properly. The error message given is
shown below.

cannot load such file -- vagrant/vmware/desktop
jim5359 commented 5 years ago

Same problem here. Windows 10 Vagrant 2.2.4 64-bit

$ vagrant plugin list
vagrant-berkshelf (5.1.2, global)
  - Version Constraint: > 0
vagrant-hostmanager (1.8.9, global)
  - Version Constraint: > 0
vagrant-omnibus (1.5.0, global)
  - Version Constraint: > 0
vagrant-vmware-desktop (2.0.3, global)
  - Version Constraint: > 0

$ vagrant global-status --prune
The plugins failed to load properly. The error message given is
shown below.

cannot load such file -- vagrant/vmware/desktop
bobtownsend commented 5 years ago

Same Issue - cannot load such file -- vagrant/vmware/desktop Windows 10 version 1809 Build 17763.316 Vagrant 2.2.4 64-bit vagrant-vmware-desktop 0.0.1 global VMware Workstation 15.0.2 Build 10952284

j0ni commented 5 years ago

Same issue here - Arch Linux current, using the vagrant 2.2.4 downloaded from the Hashicorp website.

VMware Workstation 15.1.0 build-13591040 vagrant-vmware-desktop (2.0.3, global) Linux odo 5.1.14-arch1-1-ARCH #1 SMP PREEMPT Sat Jun 22 16:28:48 UTC 2019 x86_64 GNU/Linux

Updated to add: vagrant 2.2.5 downloaded from the hashicorp site reproduces the problem.

dvzrv commented 5 years ago

I have the same problem (on Arch Linux), which makes working with vmware boxes using vagrant impossible.

$ vmware --version
VMware Workstation 15.1.0 build-13591040

$ vagrant --version
Vagrant 2.2.5

$ vagrant plugin list
vagrant-vmware-desktop (2.0.3, global)

$ vagrant box add --help
Vagrant failed to initialize at a very early stage:

The plugins failed to load properly. The error message given is
shown below.

cannot load such file -- vagrant/vmware/desktop

This is on a fresh install of the OS, but I have tried to remove and reinstall the plugin (plus using the license) as well, to no avail. We're currently on Ruby 2.6.3, in case that's of any help.

Note: This all seems to work on an older install (of vagrant and the plugin) on a macOS based machine:

$ vagrant --version
Vagrant 2.2.1

$ vagrant plugin list
vagrant-vmware-desktop (2.0.2, global)

Therefore I have also tried installing version 2.0.2 of the plugin, but that doesn't help either.

It would be great, if this would be fixed soon, as vagrant becomes pretty useless in my work context otherwise.

mrlesmithjr commented 4 years ago

Any updates on this? Fresh install of Manjaro (Arch) seeing this same thing (again):

cannot load such file -- vagrant/vmware/desktop
vmware --version
VMware Workstation 15.5.0 build-14665864
vagrant --version
Vagrant 2.2.6
vagrant plugin list
vagrant-vmware-desktop (2.0.3, global)

Similar issue from almost a year ago as reference: https://github.com/hashicorp/vagrant/issues/10472

StephanX commented 4 years ago

Affecting me as well.

mathomp-bgsu commented 4 years ago

Vagrant 2.2.7 VMware Fusion 11.5 vagrant-vmware-desktop 2.0.3 plugin on MacOS 10.14. Vagrant failed to initialize at a very early stage:

The plugins failed to load properly. The error message given is shown below.

cannot load such file -- vagrant/vmware/desktop

Vagrant 2.2.6 VMware Fusion 11.1 vagrant-vmware-desktop 2.0.3 plugin on MacOS 10.14 worked fine... more or less...

zoetsekas commented 4 years ago

Same problem with Windows 10 Enterprise edition 64

Vagrant failed to initialize at a very early stage:

The plugins failed to load properly. The error message given is
shown below.

cannot load such file -- vagrant/vmware/desktop

I don't understand why the version shows as 0.0.1

vagrant-proxyconf (2.0.7, global)
  - Version Constraint: > 0
vagrant-vmware-desktop (0.0.1, global)
  - Version Constraint: > 0
zoetsekas commented 4 years ago

Same problem with Windows 10 Enterprise edition 64

Vagrant failed to initialize at a very early stage:

The plugins failed to load properly. The error message given is
shown below.

cannot load such file -- vagrant/vmware/desktop

I don't understand why the version shows as 0.0.1

vagrant-proxyconf (2.0.7, global)
  - Version Constraint: > 0
vagrant-vmware-desktop (0.0.1, global)
  - Version Constraint: > 0

Solved the above issue by running

vagrant plugin install vagrant-vmware-desktop --plugin-version 2.0.2
disaac commented 4 years ago

Vagrant 2.2.7 VMware Fusion 11.5 vagrant-vmware-desktop 2.0.3 plugin on MacOS 10.14. Vagrant failed to initialize at a very early stage:

The plugins failed to load properly. The error message given is shown below.

cannot load such file -- vagrant/vmware/desktop

Vagrant 2.2.6 VMware Fusion 11.1 vagrant-vmware-desktop 2.0.3 plugin on MacOS 10.14 worked fine... more or less...

Downgraded to Vagrant 2.2.6 with Fusion at 11.5 vagrant-vmware-desktop 2.0.3 on MacOS 10.15.2 and issue was resolved. Seems to be something introduced on Vagrant 2.2.7 plugin worked fine once downgraded.

quinnjr commented 4 years ago

Still receiving the same error on Arch Linux.

vmware --version
VMware Workstation 15.5.2 build-15785246

vagrant --version                                                   
Vagrant 2.2.7

ruby -v              
ruby 2.1.10p492 (2016-04-01 revision 54464) [x86_64-linux]

uname -a    
Linux ishtar 5.6.3.a-1-hardened #1 SMP PREEMPT Wed, 08 Apr 2020 16:39:52 +0000 x86_64 GNU/Linux
vagrant plugin repair
Repairing currently installed global plugins. This may take a few minutes...
Failed to automatically repair installed Vagrant plugins. To fix this
problem remove all user installed plugins and reinstall. Vagrant can
do this for you automatically by running the following command:

  vagrant plugin expunge --reinstall

Failure message received during repair:

No such file or directory @ rb_sysopen - /home/rath/.vagrant.d/gems/2.7.1/gems/vagrant-vmware-desktop-2.0.3/vagrant-vmware-desktop.gemspec

vagrant plugin expunge --reinstall           

This command permanently deletes all currently installed user plugins. It
should only be used when a repair command is unable to properly fix the
system.

Continue? [N]: y

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

Vagrant will now attempt to reinstall user plugins that were removed.
Installing the 'vagrant-libvirt' plugin. This can take a few minutes...
Fetching formatador-0.2.5.gem
Fetching excon-0.73.0.gem
Fetching fog-core-1.43.0.gem
Fetching mini_portile2-2.4.0.gem
Fetching nokogiri-1.10.9.gem
Building native extensions. This could take a while...
Fetching fog-json-1.2.0.gem
Fetching fog-xml-0.1.3.gem
Fetching ruby-libvirt-0.7.1.gem
Building native extensions. This could take a while...
Fetching fog-libvirt-0.7.0.gem
Fetching vagrant-libvirt-0.0.45.gem
Fetching vagrant-vmware-desktop-2.0.2.gem
Installed the plugin 'vagrant-libvirt (0.0.45)'!
Installing the 'vagrant-vmware-desktop' plugin. This can take a few minutes...
Traceback (most recent call last):
    16: from /opt/vagrant/embedded/gems/gems/vagrant-2.2.7/bin/vagrant:182:in `<main>'
    15: from /opt/vagrant/embedded/gems/gems/vagrant-2.2.7/lib/vagrant/environment.rb:290:in `cli'
    14: from /opt/vagrant/embedded/gems/gems/vagrant-2.2.7/lib/vagrant/cli.rb:66:in `execute'
    13: from /opt/vagrant/embedded/gems/gems/vagrant-2.2.7/plugins/commands/plugin/command/root.rb:66:in `execute'
    12: from /opt/vagrant/embedded/gems/gems/vagrant-2.2.7/plugins/commands/plugin/command/expunge.rb:69:in `execute'
    11: from /opt/vagrant/embedded/gems/gems/vagrant-2.2.7/plugins/commands/plugin/command/expunge.rb:69:in `each'
    10: from /opt/vagrant/embedded/gems/gems/vagrant-2.2.7/plugins/commands/plugin/command/expunge.rb:77:in `block in execute'
     9: from /opt/vagrant/embedded/gems/gems/vagrant-2.2.7/plugins/commands/plugin/command/base.rb:14:in `action'
     8: from /opt/vagrant/embedded/gems/gems/vagrant-2.2.7/lib/vagrant/action/runner.rb:102:in `run'
     7: from /opt/vagrant/embedded/gems/gems/vagrant-2.2.7/lib/vagrant/util/busy.rb:19:in `busy'
     6: from /opt/vagrant/embedded/gems/gems/vagrant-2.2.7/lib/vagrant/action/runner.rb:102:in `block in run'
     5: from /opt/vagrant/embedded/gems/gems/vagrant-2.2.7/lib/vagrant/action/builder.rb:116:in `call'
     4: from /opt/vagrant/embedded/gems/gems/vagrant-2.2.7/lib/vagrant/action/warden.rb:57:in `call'
     3: from /opt/vagrant/embedded/gems/gems/vagrant-2.2.7/lib/vagrant/action/builtin/before_trigger.rb:23:in `call'
     2: from /opt/vagrant/embedded/gems/gems/vagrant-2.2.7/lib/vagrant/action/warden.rb:57:in `call'
     1: from /opt/vagrant/embedded/gems/gems/vagrant-2.2.7/plugins/commands/plugin/action/install_gem.rb:30:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-2.2.7/lib/vagrant/plugin/manager.rb:156:in `install_plugin': undefined method `name' for nil:NilClass (NoMethodError)
walac commented 4 years ago

Vagrant 2.2.6, Fusion 11.5.3, vmware-plugin 2.0.3 and macOS 11.15.4, same issue.

Update: thanks @zoetsekas , your solution helped

WizBangCrash commented 4 years ago

Vagrant 2.2.7, Fusion 11.5.3, vmware-plugin 2.0.3 and macOS 11.15.4, same issue.

The above configuration was working fine until I accidentally run a script that called vagrant plugin upgrade which installed vagrant-vmware-desktop (0.0.1). I'm not sure why it installed this version though. I then ran vagrant plugin install vagrant-vmware-desktop --plugin-version 2.0.3 to put the correct plugin version back, but nothing has worked since. I'm always getting cannot load such file -- vagrant/vmware/desktop

RockAfeller2013 commented 4 years ago

VMware Workstation 15 Pro v15.5.6 build-16341506 Host Windows 2012 R2 Version 6.3 Build 9600

INFO global: VAGRANT_INSTALLER_VERSION="2" INFO global: VAGRANT_LOG="info" WARN global: resolv replacement has not been enabled! INFO manager: Registered plugin: box command INFO manager: Registered plugin: cap command INFO manager: Registered plugin: vagrant-cloud INFO manager: Registered plugin: destroy command INFO manager: Registered plugin: global-status command INFO manager: Registered plugin: halt command INFO manager: Registered plugin: help command INFO manager: Registered plugin: init command INFO manager: Registered plugin: list-commands command INFO manager: Registered plugin: vagrant-login INFO manager: Registered plugin: package command INFO manager: Registered plugin: plugin command INFO manager: Registered plugin: port command INFO manager: Registered plugin: powershell command INFO manager: Registered plugin: provider command INFO manager: Registered plugin: provision command INFO manager: Registered plugin: push command INFO manager: Registered plugin: rdp command INFO manager: Registered plugin: reload command INFO manager: Registered plugin: resume command INFO manager: Registered plugin: snapshot command INFO manager: Registered plugin: ssh command INFO manager: Registered plugin: ssh-config command INFO manager: Registered plugin: status command INFO manager: Registered plugin: suspend command INFO manager: Registered plugin: up command INFO manager: Registered plugin: upload command INFO manager: Registered plugin: validate command INFO manager: Registered plugin: version command INFO manager: Registered plugin: winrm command INFO manager: Registered plugin: winrm-config command INFO manager: Registered plugin: ssh communicator INFO manager: Registered plugin: winrm communicator INFO manager: Registered plugin: windows ssh communicator INFO manager: Registered plugin: Alpine guest INFO manager: Registered plugin: ALT Platform guest INFO manager: Registered plugin: Amazon Linux guest INFO manager: Registered plugin: Arch guest INFO manager: Registered plugin: Atomic Host guest INFO manager: Registered plugin: BSD-based guest INFO manager: Registered plugin: CentOS guest INFO manager: Registered plugin: CoreOS guest INFO manager: Registered plugin: Darwin guest INFO manager: Registered plugin: Debian guest INFO manager: Registered plugin: DragonFly BSD guest INFO manager: Registered plugin: Elementary guest INFO manager: Registered plugin: ESXi guest. INFO manager: Registered plugin: Fedora guest INFO manager: Registered plugin: FreeBSD guest INFO manager: Registered plugin: Funtoo guest INFO manager: Registered plugin: Gentoo guest INFO manager: Registered plugin: Haiku guest INFO manager: Registered plugin: Kali guest INFO manager: Registered plugin: Linux guest. INFO manager: Registered plugin: Mint guest INFO manager: Registered plugin: NetBSD guest INFO manager: Registered plugin: NixOS guest INFO manager: Registered plugin: OmniOS guest. INFO manager: Registered plugin: OpenBSD guest INFO manager: Registered plugin: VMware Photon guest INFO manager: Registered plugin: PLD Linux guest INFO manager: Registered plugin: Red Hat Enterprise Linux guest INFO manager: Registered plugin: Slackware guest INFO manager: Registered plugin: SmartOS guest. INFO manager: Registered plugin: Solaris guest. INFO manager: Registered plugin: Solaris 11 guest. INFO manager: Registered plugin: SUSE guest INFO manager: Registered plugin: TinyCore Linux guest. INFO manager: Registered plugin: Trisquel guest INFO manager: Registered plugin: Ubuntu guest INFO manager: Registered plugin: Windows guest. INFO manager: Registered plugin: ALT Platform host INFO manager: Registered plugin: Arch host INFO manager: Registered plugin: BSD host INFO manager: Registered plugin: Mac OS X host INFO manager: Registered plugin: FreeBSD host INFO manager: Registered plugin: Gentoo host INFO manager: Registered plugin: Linux host INFO manager: Registered plugin: null host INFO manager: Registered plugin: Red Hat Enterprise Linux host INFO manager: Registered plugin: Slackware host INFO manager: Registered plugin: SUSE host INFO manager: Registered plugin: Void host INFO manager: Registered plugin: Windows host INFO manager: Registered plugin: kernel INFO manager: Registered plugin: kernel INFO manager: Registered plugin: docker-provider INFO manager: Registered plugin: Hyper-V provider INFO manager: Registered plugin: VirtualBox provider INFO manager: Registered plugin: ansible INFO manager: Registered plugin: CFEngine Provisioner INFO manager: Registered plugin: chef INFO manager: Registered plugin: container INFO manager: Registered plugin: docker INFO manager: Registered plugin: file INFO manager: Registered plugin: podman INFO manager: Registered plugin: puppet INFO manager: Registered plugin: salt INFO manager: Registered plugin: shell INFO manager: Registered plugin: atlas INFO manager: Registered plugin: ftp INFO manager: Registered plugin: heroku INFO manager: Registered plugin: local-exec INFO manager: Registered plugin: noop INFO manager: Registered plugin: NFS synced folders INFO manager: Registered plugin: RSync synced folders INFO manager: Registered plugin: SMB synced folders INFO vagrant: vagrant invoked: ["up"] INFO environment: Environment initialized (#<Vagrant::Environment:0x00000000069 84828>) INFO environment: - cwd: G:/vmware/test1 INFO environment: Home path: D:/Users/Administrator/.vagrant.d INFO environment: Local data path: G:/vmware/test1/.vagrant INFO manager: Plugins: INFO manager: Loading plugins... INFO manager: Plugins: INFO manager: - vagrant-reload = [installed: 0.0.1 constraint: > 0] INFO manager: - vagrant-vmware-desktop = [installed: 2.1.1 constraint: > 0] INFO manager: Loading plugins... INFO manager: Loading plugin vagrant-reload with default require: vagrant-re load INFO manager: Registered plugin: Reload INFO manager: Loading plugin vagrant-vmware-desktop with default require: va grant-vmware-desktop INFO manager: Registered plugin: VMware Workstation Provider INFO loader: Set :root = ["#<Pathname:G:/vmware/test1/Vagrantfile>"] INFO loader: Loading configuration in order: [:home, :root] INFO loader: Set "55382700_machine_default" = [] INFO loader: Loading configuration in order: [:home, :root, "55382700_machine_d efault"] INFO box_collection: Box not found: base (vmware_desktop) WARN vagrantfile: Failed to locate base with version WARN vagrantfile: Performing lookup with inital values base with version INFO box_collection: Box not found: base (vmware_desktop) INFO box_collection: Box not found: base (vmware_desktop) INFO environment: Running hook: environment_plugins_loaded INFO runner: Running action: environment_plugins_loaded #<Vagrant::Action::Buil der:0x00000000069f87c8> INFO environment: Running hook: environment_load INFO runner: Running action: environment_load #<Vagrant::Action::Builder:0x0000 000007269e70> INFO warden: Calling IN action: #<HashiCorp::VagrantVMwareDesktop::SetupPlugin: 0x000000000731d420> INFO warden: Calling IN action: HashiCorp Background Check: Start INFO warden: Calling OUT action: HashiCorp Background Check: Start INFO warden: Calling OUT action: #<HashiCorp::VagrantVMwareDesktop::SetupPlugin :0x000000000731d420> INFO cli: CLI: [] "up" [] INFO vmware_driver: VMX file: INFO environment: Getting machine: default (vmware_desktop) INFO environment: Uncached load of machine. INFO loader: Set "55382700_machine_default" = [] INFO loader: Loading configuration in order: [:home, :root, "55382700_machine_d efault"] INFO box_collection: Box not found: base (vmware_desktop, vmware_fusion, vmware _workstation) WARN vagrantfile: Failed to locate base with version WARN vagrantfile: Performing lookup with inital values base with version INFO box_collection: Box not found: base (vmware_desktop, vmware_fusion, vmware _workstation) INFO box_collection: Box not found: base (vmware_desktop, vmware_fusion, vmware _workstation) INFO machine: Initializing machine: default INFO machine: - Provider: HashiCorp::VagrantVMwareDesktop::Provider INFO machine: - Box: INFO machine: - Data dir: G:/vmware/test1/.vagrant/machines/default/vmware_de sktop INFO vmware_driver: VMX file: INFO environment: Running hook: environment_unload INFO host: Autodetecting host type for [#<Vagrant::Environment: G:/vmware/test1

] INFO host: Detected: windows! INFO runner: Running action: environment_unload #<Vagrant::Action::Builder:0x00 000000072590e8> INFO warden: Calling IN action: HashiCorp Background Check: End INFO logger: Cleaning up background activation thread... INFO warden: Calling OUT action: HashiCorp Background Check: End ERROR vagrant: Vagrant experienced an error! Details: ERROR vagrant: #<HashiCorp::VagrantVMwareDesktop::Errors::DriverAPICertificateEr ror: 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: C:/ProgramData/hashicorp/vagrant-vmware-desktop/certificates/vagrant-ut ility.client.crt Error: No such file or directory @ rb_sysopen - C:/ProgramData/hashicorp/vagra nt-vmware-desktop/certificates/vagrant-utility.client.crt> ERROR vagrant: 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: C:/ProgramData/hashicorp/vagrant-vmware-desktop/certificates/vagrant-ut ility.client.crt Error: No such file or directory @ rb_sysopen - C:/ProgramData/hashicorp/vagra nt-vmware-desktop/certificates/vagrant-utility.client.crt ERROR vagrant: D:/Users/Administrator/.vagrant.d/gems/2.6.6/gems/vagrant-vmware- desktop-2.1.1/lib/vagrant-vmware-desktop/helper/vagrant_utility.rb:80:in rescue in initialize' D:/Users/Administrator/.vagrant.d/gems/2.6.6/gems/vagrant-vmware-desktop-2.1.1/l ib/vagrant-vmware-desktop/helper/vagrant_utility.rb:76:ininitialize' D:/Users/Administrator/.vagrant.d/gems/2.6.6/gems/vagrant-vmware-desktop-2.1.1/l ib/vagrant-vmware-desktop/driver.rb:160:in new' D:/Users/Administrator/.vagrant.d/gems/2.6.6/gems/vagrant-vmware-desktop-2.1.1/l ib/vagrant-vmware-desktop/driver.rb:160:ininitialize' D:/Users/Administrator/.vagrant.d/gems/2.6.6/gems/vagrant-vmware-desktop-2.1.1/l ib/vagrant-vmware-desktop/driver.rb:1155:in new' D:/Users/Administrator/.vagrant.d/gems/2.6.6/gems/vagrant-vmware-desktop-2.1.1/l ib/vagrant-vmware-desktop/driver.rb:1155:increate' D:/Users/Administrator/.vagrant.d/gems/2.6.6/gems/vagrant-vmware-desktop-2.1.1/l ib/vagrant-vmware-desktop/provider.rb:48:in machine_id_changed' D:/Users/Administrator/.vagrant.d/gems/2.6.6/gems/vagrant-vmware-desktop-2.1.1/l ib/vagrant-vmware-desktop/provider.rb:31:ininitialize' C:/HashiCorp/Vagrant/embedded/gems/2.2.9/gems/vagrant-2.2.9/lib/vagrant/machine. rb:139:in new' C:/HashiCorp/Vagrant/embedded/gems/2.2.9/gems/vagrant-2.2.9/lib/vagrant/machine. rb:139:ininitialize' C:/HashiCorp/Vagrant/embedded/gems/2.2.9/gems/vagrant-2.2.9/lib/vagrant/vagrantf ile.rb:81:in new' C:/HashiCorp/Vagrant/embedded/gems/2.2.9/gems/vagrant-2.2.9/lib/vagrant/vagrantf ile.rb:81:inmachine' C:/HashiCorp/Vagrant/embedded/gems/2.2.9/gems/vagrant-2.2.9/lib/vagrant/environm ent.rb:715:in machine' C:/HashiCorp/Vagrant/embedded/gems/2.2.9/gems/vagrant-2.2.9/lib/vagrant/plugin/v 2/command.rb:180:inblock in with_target_vms' C:/HashiCorp/Vagrant/embedded/gems/2.2.9/gems/vagrant-2.2.9/lib/vagrant/plugin/v 2/command.rb:204:in block in with_target_vms' C:/HashiCorp/Vagrant/embedded/gems/2.2.9/gems/vagrant-2.2.9/lib/vagrant/plugin/v 2/command.rb:186:ineach' C:/HashiCorp/Vagrant/embedded/gems/2.2.9/gems/vagrant-2.2.9/lib/vagrant/plugin/v 2/command.rb:186:in with_target_vms' C:/HashiCorp/Vagrant/embedded/gems/2.2.9/gems/vagrant-2.2.9/plugins/commands/up/ command.rb:87:inexecute' C:/HashiCorp/Vagrant/embedded/gems/2.2.9/gems/vagrant-2.2.9/lib/vagrant/cli.rb:6 7:in execute' C:/HashiCorp/Vagrant/embedded/gems/2.2.9/gems/vagrant-2.2.9/lib/vagrant/environm ent.rb:290:incli' C:/HashiCorp/Vagrant/embedded/gems/2.2.9/gems/vagrant-2.2.9/bin/vagrant:205:in `

' INFO interface: error: Vagrant encountered an error while attempting to load th e 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: C:/ProgramData/hashicorp/vagrant-vmware-desktop/certificates/vagrant-ut ility.client.crt Error: No such file or directory @ rb_sysopen - C:/ProgramData/hashicorp/vagra nt-vmware-desktop/certificates/vagrant-utility.client.crt 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: C:/ProgramData/hashicorp/vagrant-vmware-desktop/certificates/vagrant-ut ility.client.crt Error: No such file or directory @ rb_sysopen - C:/ProgramData/hashicorp/vagra nt-vmware-desktop/certificates/vagrant-utility.client.crt INFO interface: Machine: error-exit ["HashiCorp::VagrantVMwareDesktop::Errors:: DriverAPICertificateError", "Vagrant encountered an error while attempting to lo ad the utility\nservice key file. This error can occur if the Vagrant VMware Uti lity\nhas not yet been installed, or if it was installed incorrectly. If\nthis e rror persists after running the Vagrant VMware Utility installer\nagain, please contact support at: support@hashicorp.com\n\nInformation about the Vagrant VMwar e Utility, including installation\ninstruction, can be found here:\n\n https:// www.vagrantup.com/docs/vmware/vagrant-vmware-utility.html\n\n Path: C:/Program Data/hashicorp/vagrant-vmware-desktop/certificates/vagrant-utility.client.crt\n Error: No such file or directory @ rb_sysopen - C:/ProgramData/hashicorp/vagran t-vmware-desktop/certificates/vagrant-utility.client.crt"]
pale3 commented 3 years ago

What is status with this?

Cos of above, during last year I was forced to use appimage release and it that time it worked fine until recently Archlinux bumped curl and related pkgs has been rebuilt against one so now I am stuch with #9908.

Our company pays licenses for vmware plugin and it is literally unusable. In addition I have to remove vmware plugin to be able to work at least on vbox. I do not understand your motivation behind this, ether fix this plugin or don't sell it. There are multiple issues with vmware providers and noone is giving a shit about it. This is completely unacceptable anymore!!

jamesdbloom commented 3 years ago

This issue is still outstanding for nearly a year, having just paid for a license for a plugin that is totally faulty this seems pretty ridiculous. How long does it take to fix this issue given customers are paying for a working solution?

tjmullicani commented 2 years ago

I was able to successfully run against VMware Workstation on Linux using the following steps.

References: https://www.vagrantup.com/docs/providers/vmware/installation https://www.vagrantup.com/docs/providers/vmware/vagrant-vmware-utility

[tim@fedora test]$ lsb_release -a -s
:core-4.1-amd64:core-4.1-noarch Fedora "Fedora release 35 (Thirty Five)" 35 ThirtyFive
[tim@fedora test]$ vmware --version
VMware Workstation 16.2.3 build-19376536
[tim@fedora test]$ vagrant --version
Vagrant 2.2.19
[tim@fedora test]$ vagrant plugin install vagrant-vmware-desktop
Installing the 'vagrant-vmware-desktop' plugin. This can take a few minutes...
Installed the plugin 'vagrant-vmware-desktop (3.0.1)'!
[tim@fedora test]$ 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
[tim@fedora test]$ wget https://releases.hashicorp.com/vagrant-vmware-utility/1.0.21/vagrant-vmware-utility_1.0.21_linux_amd64.zip
[tim@fedora test]$ sudo mkdir -p /opt/vagrant-vmware-desktop/bin
[tim@fedora test]$ sudo unzip -d /opt/vagrant-vmware-desktop/bin vagrant-vmware-utility_1.0.21_linux_amd64.zip
Archive:  vagrant-vmware-utility_1.0.21_linux_amd64.zip
  inflating: /opt/vagrant-vmware-desktop/bin/vagrant-vmware-utility  
[tim@fedora test]$ sudo /opt/vagrant-vmware-desktop/bin/vagrant-vmware-utility certificate generate
Certificate generation complete!
 -> /opt/vagrant-vmware-desktop/certificates
[tim@fedora test]$ sudo /opt/vagrant-vmware-desktop/bin/vagrant-vmware-utility service install
Service has been installed!
[tim@fedora test]$ sudo mkdir -p /opt/vagrant-vmware-desktop/bin
[tim@fedora test]$ sudo unzip -d /opt/vagrant-vmware-desktop/bin vagrant-vmware-utility_1.0.21_linux_amd64.zip
Archive:  vagrant-vmware-utility_1.0.21_linux_amd64.zip
  inflating: /opt/vagrant-vmware-desktop/bin/vagrant-vmware-utility  
[tim@fedora test]$ sudo /opt/vagrant-vmware-desktop/bin/vagrant-vmware-utility certificate generate
Certificate generation complete!
 -> /opt/vagrant-vmware-desktop/certificates
[tim@fedora test]$ sudo /opt/vagrant-vmware-desktop/bin/vagrant-vmware-utility service install
Service has been installed!
[tim@fedora test]$ vagrant up --provider vmware_workstation
Bringing machine 'default' up with 'vmware_workstation' provider...
...
szeitlin commented 2 years ago

I'm getting the same error on Vagrant 2.2.18

kaspars-vilde commented 1 year ago

Still get this error. Vagrant 2.3.0, vagrant-vmware-desktop (3.0.1, global) C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.7.0/fileutils.rb:1460:in `rmdir': Directory not empty @ dir_s_rmdir

pawaanv commented 1 year ago

still error persists on m1 mac 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

mrmashal commented 1 year ago

The "cannot load such file" error on Windows, usually happens when the Command Prompt or PowerShell is using a codepage which is not supported by Ruby. You just need to run this before your command, to change the codepage to UTF-8:

chcp 65001

danquack commented 1 year ago

@pawaanv to get it working on m1, I installed the utility via home-brew brew install --cask vagrant-vmware-utility

reference: https://gist.github.com/sbailliez/f22db6434ac84eccb6d3c8833c85ad92

King-Kingah commented 7 months ago

I was able to successfully run against VMware Workstation on Linux using the following steps.

References: https://www.vagrantup.com/docs/providers/vmware/installation https://www.vagrantup.com/docs/providers/vmware/vagrant-vmware-utility

[tim@fedora test]$ lsb_release -a -s
:core-4.1-amd64:core-4.1-noarch Fedora "Fedora release 35 (Thirty Five)" 35 ThirtyFive
[tim@fedora test]$ vmware --version
VMware Workstation 16.2.3 build-19376536
[tim@fedora test]$ vagrant --version
Vagrant 2.2.19
[tim@fedora test]$ vagrant plugin install vagrant-vmware-desktop
Installing the 'vagrant-vmware-desktop' plugin. This can take a few minutes...
Installed the plugin 'vagrant-vmware-desktop (3.0.1)'!
[tim@fedora test]$ 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
[tim@fedora test]$ wget https://releases.hashicorp.com/vagrant-vmware-utility/1.0.21/vagrant-vmware-utility_1.0.21_linux_amd64.zip
[tim@fedora test]$ sudo mkdir -p /opt/vagrant-vmware-desktop/bin
[tim@fedora test]$ sudo unzip -d /opt/vagrant-vmware-desktop/bin vagrant-vmware-utility_1.0.21_linux_amd64.zip
Archive:  vagrant-vmware-utility_1.0.21_linux_amd64.zip
  inflating: /opt/vagrant-vmware-desktop/bin/vagrant-vmware-utility  
[tim@fedora test]$ sudo /opt/vagrant-vmware-desktop/bin/vagrant-vmware-utility certificate generate
Certificate generation complete!
 -> /opt/vagrant-vmware-desktop/certificates
[tim@fedora test]$ sudo /opt/vagrant-vmware-desktop/bin/vagrant-vmware-utility service install
Service has been installed!
[tim@fedora test]$ sudo mkdir -p /opt/vagrant-vmware-desktop/bin
[tim@fedora test]$ sudo unzip -d /opt/vagrant-vmware-desktop/bin vagrant-vmware-utility_1.0.21_linux_amd64.zip
Archive:  vagrant-vmware-utility_1.0.21_linux_amd64.zip
  inflating: /opt/vagrant-vmware-desktop/bin/vagrant-vmware-utility  
[tim@fedora test]$ sudo /opt/vagrant-vmware-desktop/bin/vagrant-vmware-utility certificate generate
Certificate generation complete!
 -> /opt/vagrant-vmware-desktop/certificates
[tim@fedora test]$ sudo /opt/vagrant-vmware-desktop/bin/vagrant-vmware-utility service install
Service has been installed!
[tim@fedora test]$ vagrant up --provider vmware_workstation
Bringing machine 'default' up with 'vmware_workstation' provider...
...

This has worked for me: ❯ lsb_release -a
No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 23.04 Release: 23.04 Codename: lunar

agafonoo commented 5 months ago

do mkdir -p /opt/vagrant-vmware-desktop/bin

I was able to successfully run against VMware Workstation on Linux using the following steps.

References: https://www.vagrantup.com/docs/providers/vmware/installation https://www.vagrantup.com/docs/providers/vmware/vagrant-vmware-utility

[tim@fedora test]$ lsb_release -a -s
:core-4.1-amd64:core-4.1-noarch Fedora "Fedora release 35 (Thirty Five)" 35 ThirtyFive
[tim@fedora test]$ vmware --version
VMware Workstation 16.2.3 build-19376536
[tim@fedora test]$ vagrant --version
Vagrant 2.2.19
[tim@fedora test]$ vagrant plugin install vagrant-vmware-desktop
Installing the 'vagrant-vmware-desktop' plugin. This can take a few minutes...
Installed the plugin 'vagrant-vmware-desktop (3.0.1)'!
[tim@fedora test]$ 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
[tim@fedora test]$ wget https://releases.hashicorp.com/vagrant-vmware-utility/1.0.21/vagrant-vmware-utility_1.0.21_linux_amd64.zip
[tim@fedora test]$ sudo mkdir -p /opt/vagrant-vmware-desktop/bin
[tim@fedora test]$ sudo unzip -d /opt/vagrant-vmware-desktop/bin vagrant-vmware-utility_1.0.21_linux_amd64.zip
Archive:  vagrant-vmware-utility_1.0.21_linux_amd64.zip
  inflating: /opt/vagrant-vmware-desktop/bin/vagrant-vmware-utility  
[tim@fedora test]$ sudo /opt/vagrant-vmware-desktop/bin/vagrant-vmware-utility certificate generate
Certificate generation complete!
 -> /opt/vagrant-vmware-desktop/certificates
[tim@fedora test]$ sudo /opt/vagrant-vmware-desktop/bin/vagrant-vmware-utility service install
Service has been installed!
[tim@fedora test]$ sudo mkdir -p /opt/vagrant-vmware-desktop/bin
[tim@fedora test]$ sudo unzip -d /opt/vagrant-vmware-desktop/bin vagrant-vmware-utility_1.0.21_linux_amd64.zip
Archive:  vagrant-vmware-utility_1.0.21_linux_amd64.zip
  inflating: /opt/vagrant-vmware-desktop/bin/vagrant-vmware-utility  
[tim@fedora test]$ sudo /opt/vagrant-vmware-desktop/bin/vagrant-vmware-utility certificate generate
Certificate generation complete!
 -> /opt/vagrant-vmware-desktop/certificates
[tim@fedora test]$ sudo /opt/vagrant-vmware-desktop/bin/vagrant-vmware-utility service install
Service has been installed!
[tim@fedora test]$ vagrant up --provider vmware_workstation
Bringing machine 'default' up with 'vmware_workstation' provider...
...

This also worked for me.

lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 22.04.3 LTS Release: 22.04 Codename: jammy

vagrant --version Vagrant 2.4.0

NL-TCH commented 2 weeks ago
cd ~/Downloads/
wget https://releases.hashicorp.com/vagrant-vmware-utility/1.0.21/vagrant-vmware-utility_1.0.21_linux_amd64.zip
sudo mkdir -p /opt/vagrant-vmware-desktop/bin
sudo unzip -d /opt/vagrant-vmware-desktop/bin vagrant-vmware-utility_1.0.21_linux_amd64.zip
sudo /opt/vagrant-vmware-desktop/bin/vagrant-vmware-utility certificate generate
sudo /opt/vagrant-vmware-desktop/bin/vagrant-vmware-utility service install
sudo mkdir -p /opt/vagrant-vmware-desktop/bin
sudo unzip -d /opt/vagrant-vmware-desktop/bin vagrant-vmware-utility_1.0.21_linux_amd64.zip
sudo /opt/vagrant-vmware-desktop/bin/vagrant-vmware-utility certificate generate
sudo /opt/vagrant-vmware-desktop/bin/vagrant-vmware-utility service install

This worked indeed, thanks!