Vagrant VMware Utility driver
Asked Answered
D

3

8

First of all I'm sorry if someone already did this question, in this case please paste the link here because I didn't find anything. I'm learning vagrant, using virtualbox i don't have problem in running VM, but if I would like to use VMware as provider. I encounter this message and I can't find a way to get out of this. I think everything is well configured but obviously something is wrong.

When I launch vagrant up --provider=vmware_desktop, I have this error message:

Vagrant encountered an unexpected communications error with the
Vagrant VMware Utility driver. Please try to run the command
again. If this error persists, please contact [email protected]

I'm currently using Fedora 35

Operating System: Fedora Linux 35 (Workstation Edition)
          Kernel: Linux 5.17.5-200.fc35.x86_64
    Architecture: x86-64
Deiform answered 4/5, 2022 at 11:57 Comment(5)
did u download the VMWare utility driver ? vagrantup.com/docs/providers/vmware/vagrant-vmware-utilitySplendent
Everything done, even now I make another time everything to be sure, and I don't encounter problem in this phaseDeiform
I confirm that I also applied well the certificate and licenseDeiform
can you add in your question the Vagrantfile, check service.log (on Mac its /Library/Application Support/vagrant-vmware-utility/service.log) to make sure service is runningSplendent
I have the same issue on Mac M1Cadaverous
C
3

I have followed this thread:

https://github.com/hashicorp/vagrant-vmware-desktop/issues/22

and someone had prepared a nice gist -- which I copied below just in case the gist link wasn't anymore.

My issue was mainly the Vagrant 2.2.19 which somehow was not ok with VMWare. 2.2.18 worked fine. Just make sure you follow the above gist step by step.

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

My issue was mainly the Vagrant 2.2.19 which somehow was not ok with VMWare. 2.2.18 worked fine. Just make sure you follow the above gist step by step.

Vagrant and VMWare Tech Preview on Apple M1 Pro

This document summarizes notes taken while to make the VMWare Tech preview work on Apple M1 Pro, it originated from discussions in https://github.com/hashicorp/vagrant-vmware-desktop/issues/22

Installing Rosetta

First install Rosetta if not already done, this is needed to run x86 code:

/usr/sbin/softwareupdate --install-rosetta --agree-to-license

Installing Vagrant

Install Vagrant via brew or install it manually. Note that I use 2.2.18 as 2.2.19 did not work for me. (YMMV)

brew install [email protected]

Installing VMWare Fusion Tech Preview

You will need to create an account on vmware as it needs user and key information that are user specific. The registration process is kinda convoluted. Be careful about passwords as the password needs to be less than 20 characters and there are no error messages for this.

You can download the tech preview via the download page.

Once this is installed you will NEED to create a symlink as the vagrant vmware utility etc.. assumes that vmware is installed in a specific directory and the tech preview is installed in a different one.

ln -s /Applications/VMWare\ Fusion\ Tech\ Preview.app /Applications/VMWare\ Fusion.app

Installing Vagrant VMWare provider

It requires two steps. This is detailed in the documentation but follow the steps below:

First go to Vagrant vmware Utility and download the binary and install it. It says x86_64 but it is fine.

The direct link is:

https://releases.hashicorp.com/vagrant-vmware-utility/1.0.21/vagrant-vmware-utility_1.0.21_x86_64.dmg

It needs to be version 1.0.21

Next install the provider:

vagrant plugin install vagrant-vmware-desktop

Create a Vagrant file

Create a file Vagrantfile

Vagrant.configure("2") do |config|
  config.vm.box = "spox/ubuntu-arm"
  config.vm.box_version = "1.0.0"
end

Run vagrant

vagrant up

and then

vagrant ssh

Hopefully this should work and you should find yourself with mostly everything working.

Troubleshooting

I have observed various issues that makes the whole experience unstable or creating conflicts.

vagrant 2.2.19 is broken

I have had issues trying to run vagrant 2.2.19. Use 2.2.18

vagrant-vmware provider forwarded ports bound

If you declare forwarding port on your box, for some reasons the provider persists them and keeps it bound in LISTEN state even after you do a vagrant halt.

You can check this using something like:

sudo lsof -i -P | grep LISTEN | grep 'vagrant-v'

You can see the ports are stored in:

cat /opt/vagrant-vmware-desktop/settings/portforwarding.json

To stop the provider use:

sudo launchctl unload -w /Library/LaunchDaemons/com.vagrant.vagrant-vmware-utility.plist

To start it again, use load instead of unload.

nfs exports conflicts

If your vagrant box uses nfs, it seems to pollute the /etc/exports file with duplicate or stale entries over time which will cause vagrant to get angry at you at some point. You may need to prune the entries. It seems related to vagrant#11418

Cadaverous answered 4/7, 2022 at 17:27 Comment(2)
Amir jan, I have tried everything written in this answer, but none of them worked properly on M2.Barone
I have not tried any of the above on M2 unfortunately but only M1 pro. To the best of my knowledge, recently Virtual Box has released a developer preview version (virtualbox.org/wiki/Downloads) that works with Mac M1 and M2. That might be a more reliable solution since with virtual box you might be able to create your own boxes. So you might want to use virtual box as a provider instead. Again I have not tried this one myself either, just a suggestionCadaverous
C
0

I encountered this same issue you had with the architecture compatibility while trying to set up VM on my Mac M1. Found my solution in this GitHub thread

I just added this lines to the Vagrantfile

config.vm.provider :vmware_desktop do |v|
        v.vmx["ethernet0.pcislotnumber"] = "160"
end 
Coverture answered 29/8, 2022 at 17:52 Comment(2)
Hi, It would be helpful if someone can also point where the Vagrantfile livesPoirier
@Poirier I don't know if you have found the answer to this. The Vagrant file can be found in your home directory from your terminal just type ls -a then you should see Vagrantfile in the list if you have a VM installed, then to open with vim or vi editor vi Vagrantfile, make your edits and save your changes.Coverture
A
0

Just encountered the same error and then went with another box work for me. Initially, I was trying with bento/ubuntu-22.04 box, but it was showing the same error, then tried with bento/ubuntu-20.04 worked for me.

Autobus answered 4/3 at 10:45 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.