Setup Vagrant In Apple Silicon Mac

Odyssey Unheard
2 min readMay 18, 2024

--

I want to experiment running different kinds of VM for investigating various tools configurations. Currently, I couldn’t find any straightforward way to making vagrant works for M1/M2 Mac. So, I tried to find alternatives and was able to successfully setting up Vagrant for my Mac M1 machine.

Installation Steps:

First, we need to install vagrant according to hashicorp instruction.

I used brew to install like below

brew tap hashicorp/tap
brew install hashicorp/tap/hashicorp-vagrant

Second, I need to intall Rosetta. Rosetta is a dynamic binary translator developed by Apple that allows applications built for Intel-based Macs to run on Apple Silicon Macs, such as those with the M1 or M2 chips.

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

Third, download and install VMWare Fusion. VMware Fusion is a virtualization software developed by VMware for macOS. It allows users to run multiple operating systems, such as Windows, Linux, and other versions of macOS, on a Mac without rebooting. With the transition to Apple Silicon (M1 and M2 chips), VMware Fusion had to undergo significant changes to support the new ARM architecture.

Below link will help to get VMWare for Vagrant
https://developer.hashicorp.com/vagrant/docs/providers/vmware

Fourth, It is also necessary to download and install Vagrant VMWare Utility.

vagrant plugin install vagrant-vmware-desktop

Official Hashicorp link for vagrant vmware utility installation
https://developer.hashicorp.com/vagrant/docs/providers/vmware/vagrant-vmware-utility#vagrant-vmware-utility-installation

Finally, create a Vagrantfile and run vagrant up command to test a VM.
Below link will help to get started to create a VM.
https://developer.hashicorp.com/vagrant/tutorials/getting-started/getting-started-boxes

Create Sample Vagrantfile and Run command ‘vagrant up’. You may need to use SUDO to run vagrant up.

Vagrant.configure("2") do |config| 
config.vm.box = "" # choose a box type for your requirement
config.vm.box_version = "" # specify box version
config.vm.box_check_update = false
config.vm.provider "vmware_desktop" do |vmware|
vmware.gui = false
vmware.allowlist_verified = true
end
end

You can choose a box type
https://app.vagrantup.com/boxes/search

I have roughly write down the steps which worked for me. I believe if someone follows above steps will be able to successfully run Vagrant VM on his Apple silicon M1/M2 machine. Above, steps may not work immediately for someone due to some configuration issue.

--

--