vagrant
vagrant copied to clipboard
Vagrant VMWare connection error
If I try a vagrant up or destroy sometime vagrant comes back with an error like
An error was encountered while generating the current list of available VMware adapters in use on this system. Get "http://localhost:49742/api/vmnet": GET http://localhost:49742/api/vmnet giving up after 5 attempt(s): Get "http://localhost:49742/api/vmnet": dial tcp [::1]:49742: connectex: No connection could be made because the target machine actively refused it.
Please resolve any problems reported in the error message above and try again.
The second and further vagrant commands works well after the first error.
It seems so that the error comes after a while when I don't use a vagrant command. I assume that the vagrant vmware utility takes a while for the first command to connect.
Vagrant version
2.2.19
Vagrant vmware utility version
1.0.21
VMWare Workstation version
15.5.7 build-17171714
Host operating system
Windows 10 Version 21H2 Build 10944.1446
I'm seeing this issue on MacOS Monterey servers. Appears that the Vagrant VMWare Utility is dying and the cli programs are therefore unable to connect to service. Blocks destroy and ssh to guest. Restarting the utility (via launchctl on MacOS) resolves issue. Same vagrant and utility versions as OP but on MacOS Monterey 12.1 with MacOS guest.
The commands to stop/restart the vagrant vmware utility on Mac are:
sudo launchctl unload -w /Library/LaunchDaemons/com.vagrant.vagrant-vmware-utility.plist
sudo launchctl load -w /Library/LaunchDaemons/com.vagrant.vagrant-vmware-utility.plist
In case anyone is googling and end up here
I'd love to see this issue get resolved. I'm on Venture 13.0 and this happens fairly regularly.
I have never ran into this issue before upgrading to Ventura on M1. Now it seems to be a regular thing.
For M1 I have switched to packer / tart (Cirrus Labs) using native Apple Virtualization. Works well
Any progress on this?
I was facing issues with VMWare Fusion on AppleSilicon M3 using MacOS 14.3 (23D56)
and with Vagrant 2.4.0
. The suggestion from @fredngo helped immensely.
sudo launchctl unload -w /Library/LaunchDaemons/com.vagrant.vagrant-vmware-utility.plist sudo launchctl load -w /Library/LaunchDaemons/com.vagrant.vagrant-vmware-utility.plist