Skip to content

Instantly share code, notes, and snippets.

@sbailliez
Last active March 26, 2024 15:38
Show Gist options
  • Star 58 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save sbailliez/2305d831ebcf56094fd432a8717bed93 to your computer and use it in GitHub Desktop.
Save sbailliez/2305d831ebcf56094fd432a8717bed93 to your computer and use it in GitHub Desktop.
Vagrant and VMWare Fusion 13 on Apple M1 Pro

Vagrant and VMWare Fusion 13 Player on Apple M1 Pro

This document summarizes notes taken to make VMWare Fusion 13 Player work on Apple M1 Pro. It builds upon a previous document based on VMWare Tech Preview 21H1

VMWare Fusion 13 was released on November 17, 2022 and Fusion 13.5 on October 19, 2023

Created on: November 20, 2022

Updated on: December 12, 2023

This process has been used from macOS 12.6.1 to macOS 14.2

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.

brew install vagrant@2.4.0

Installing VMWare Fusion Player

Not going to describe how to get VMWare Fusion 13 Player at this time.

It is possible to get VMWare Fusion 13 Player free for a personal license but the download and registration process is downright hostile for the end user. You should be expected to have to login in Incognito Window and try different browsers if necessary. You may also want to disable your ad-blocker if you have any as it may interfer with some pages.

If you use it as part of your work, you can go through the normal purchase process in the VMWare Store.

Installing Vagrant VMWare provider

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

It is now available via brew, so you can do

brew install --cask vagrant-vmware-utility

Otherwise, go to Vagrant vmware Utility and download the binary and install it. The direct link is 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

You can use the following example as a box based on Ubuntu 20.04.5:

Vagrant.configure("2") do |config|
    config.vm.box = "starboard/ubuntu-arm64-20.04.5"
    config.vm.box_version = "20221120.20.40.0"
    config.vm.box_download_insecure = true
    config.vm.provider "vmware_desktop" do |v|
        v.ssh_info_public = true
        v.gui = true
        v.linked_clone = false
        v.vmx["ethernet0.virtualdev"] = "vmxnet3"
    end
end

The line v.vmx["ethernet0.virtualdev"] = "vmxnet3" is extremely important otherwise your box will most likely fail to boot as it will try to use the legacy e1000 VMWare NIC which is apparently not working anymore.

Run vagrant

vagrant up

and then

vagrant ssh

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

Resources

  • Unofficial Fusion for Apple Silicon Companion Guide - This document is a compilation of tips, tricks and gotchas related to the use of VMWare Fusion on Apple Silicon. It is a gold mine and where you will find the most up to date information in relation to the OS you want to run and more.

Please do check the document above before chosing a random vagrant box to run. The distribution and kernel version used on a box is extremely important and is the difference between working or not.

@groksrc
Copy link

groksrc commented Dec 9, 2022

This worked for me! 🎉

@myusufid
Copy link

this worked for me!

@griffiti
Copy link

This worked for me!

@dutchmichael
Copy link

Thank you, that probably saved me a couple hours, by not having to go down another rabbit hole. I never could get the Tech review running properly, and had switched to UTM, unfortunately UTM does not work with Vagrant. Noticed that VMware had updated to 13, and downloaded the other day. and glad I found your work. Now I need to go relearn Vagrant. Sales by day, and learning development at night.

@michael-shl
Copy link

Thank you. this worked for me.

@gilbertlim
Copy link

This worked for me!

@imnhema
Copy link

imnhema commented Jan 7, 2023

Thanks..works great.

@ptrk8
Copy link

ptrk8 commented Feb 6, 2023

Have you been able to get this to run with v.gui = false? I'm getting the following error:

==> default: Starting the VMware VM...
An error occurred while executing `vmrun`, a utility for controlling
VMware machines. The command and output are below:

Command: ["start", "/Users/ptrk/vagrant-vmware-vms/150cddc1-51ec-4a5b-83d2-068e0bcbc141/ubuntu-arm64-20.04.5-3.vmx", "nogui", {:notify=>[:stdout, :stderr], :timeout=>45}]

Stdout: 2023-02-06T20:15:16.675| ServiceImpl_Opener: PID 92865
Error: The operation was canceled

Stderr:

@ZimmerHao
Copy link

@ptrk8 Same error. Is there a solution to this problem?

@ptrk8
Copy link

ptrk8 commented Feb 8, 2023

@ZimmerHao This worked for me but it is only a temporary fix since you need to do this every time you create a new VM.

@TheGrish
Copy link

This tutorial works like a charm as long as I use the vagrant box from the example. With most other boxes I tried, it doesn't get beyond
==> default: Waiting for the VM to receive an address...
It worked before I updated to MacOS 13 Ventura. In the VMware Fusion GUI I can see the VM starting, but apparently it doesn't get an IP.
Does anybody have a similar problem and knows a solution?

@PaulSinghDev
Copy link

Seems to be the only viable solutions still. Thank you for the writeup <3

@westhusing
Copy link

@sbailliez Your link under the "Installing VMWare Fusion Player" section links to the old v12 player that will not work with Vagrant on Apple Silicon Macs. I got this working by downloading and installing the v13 player (link).

@ivanisconfused
Copy link

@TheGrish i was running into similar issues - i deleted the vagrant file from /opt/ and reinstalled using this tutorial's brew steps (idk maybe u had also previously downloaded the binary from their site?) and it fixed it for me :)

@theJaxon
Copy link

theJaxon commented Jul 3, 2023

@sbailliez It worked alright with VMware Fusioon 13, however I'm struggling with lack of Vagrant boxes, only this box worked and I'm unable to get any other box that supports vmware_fusion to work.

anyone succeeded with different boxes (more recent version of ubuntu or centos ? )


Update

@MuhammetBurakGolec
Copy link

This worked for me.

Thanks

@andrea-mengascini
Copy link

No idea why but it doesn't work for me. I have the latest vagrant and not the 3.0.3 and VMWare do not seems to starting any VM (blank screen from VMWare Fusion):

==> default: Starting the VMware VM...
Vagrant timed out while trying to start the VMware machine. This
error is caused by VMware never successfully starting the machine.
This can often be fixed by simply retrying. If the error persists,
please verify that VMware is functional. This is not a Vagrant
issue.

@aashishsingh2803
Copy link

aashishsingh2803 commented Sep 14, 2023

The same thing happening with me as well getting below error

==> default: Checking if box 'centos/7' version '2004.01' is up to date...
==> default: Verifying vmnet devices are healthy...
==> default: Preparing network adapters...
==> default: Starting the VMware VM...
Vagrant timed out while trying to start the VMware machine. This
error is caused by VMware never successfully starting the machine.
This can often be fixed by simply retrying. If the error persists,
please verify that VMware is functional. This is not a Vagrant
issue.

@fewknow
Copy link

fewknow commented Oct 13, 2023

This doesn't seem to work with latest macOS 13.5.2 . I am continuously getting
d122053@MLFYG72TK615 macOS $ vagrant up
Vagrant encountered an unexpected communications error with the
Vagrant VMware Utility driver. Please try to run the command
again. If this error persists, please open a new issue at:

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

Has anyone else been able to get this working with 13.5.2?

@jLebioda
Copy link

On MacOS, if you are using the Public Tech Preview, you might need to create one symlink:
ln -s /Applications/VMWare\ Fusion\ Tech\ Preview.app /Applications/VMWare\ Fusion.app - which resolves the issue

@nttg8100
Copy link

nttg8100 commented Dec 9, 2023

It worked for me on the Macbook Pro 16 2021. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment