Skip to content

Instantly share code, notes, and snippets.

@sbailliez
Last active September 28, 2024 13:31
Show Gist options
  • 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 (deprecated) 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: June 1, 2024

This process has been used from macOS 12.6.1 to macOS 14.5

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 [email protected]

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 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.

@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.

Copy link

ghost commented May 6, 2024

Hi, new to using vagrant and on Apple Silicon Macs; I'm trying to get things setup with VMWare as my VM provider (going to use it for an Ubuntu22.04 ARM image). I'm able to do this manually fine, but want to do it with Vagrant.

The official documentation says the following here https://developer.hashicorp.com/vagrant/tutorials/getting-started/getting-started-index :
Screenshot 2024-05-06 at 12 01 28 PM

  1. I'm running the free version of VMWare Fusion desktop on Mac (and am able to make a standalone Ubuntu VM without vagrant); do I need this VMWare Fusion Tech Preview? The blog post it references is from 2021 so I figured it must be out of date. Can I just use the existing VMware Fusion app I have, or do I need this 'tech preview'? (One of the links in there seems broken)

  2. I noticed on the vagrant website there's only an x86/64 version of the vmware utility here https://developer.hashicorp.com/vagrant/install/vmware; is the purpose of installing rosetta to be able to run the former?

  3. Looks like the guide referenced Unofficial Fusion for Apple Silicon Companion Guide can no longer be found (it redirects to a Broadcom website) Edit: I think I found a copy here: https://www.coursesidekick.com/information-systems/3548166

Any help would be greatly appreciated. Thank you so much!

Edit: I was able to boot after changing to bento/ubuntu-22.04; it turns out the getting started tutorial for those new to Vagrant uses called hashicorp/bionic64, whichlists unknown* under vmware_desktop; however, if I use bento/ubuntu-22.04, under vmware_desktop, i see arm64 listed (my guess is what is listed in the tutorial is not supported for arm64 on vmware. The issue now though is even though vb.gui = true, no GUI is appearing, but I think that can be fixed by installing some ubuntu packages with apt

Copy link

ghost commented Jun 25, 2024

I am getting the below error, tried with different versions and still the same issue. Any possible solution for this?

An error occurred while executing `vmrun`, a utility for controlling
VMware machines. The command and output are below:

Command: ["-T", "fusion", "start", "/Users/harisai.marisa/PG_Hacker/.vagrant/machines/default/vmware_desktop/a32a14b0-4edf-4ff8-98a3-321c1ed87396/ubuntu-18.04-amd64.vmx", "nogui", {:notify=>[:stdout, :stderr], :timeout=>45}]

Stdout: 2024-06-25T18:59:47.129| ServiceImpl_Opener: PID 82788
Error: The operation was canceled

Stderr: 

Copy link

ghost commented Jun 25, 2024

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

I am not able to do this as well, facing below issue, How did you resolve this?

harisai.marisa@MAC-XR PG_Hacker % ln -s /Applications/VMWare\ Fusion\ Tech\ Preview.app /Applications/VMWare\ Fusion.app
ln: /Applications/VMWare Fusion.app/VMWare Fusion Tech Preview.app: Operation not permitted
harisai.marisa@MAC-XR PG_Hacker % 

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