Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save kalharbi/a840eee2692c57ac3d71a0656ce8a94d to your computer and use it in GitHub Desktop.
Save kalharbi/a840eee2692c57ac3d71a0656ce8a94d to your computer and use it in GitHub Desktop.
Starting a Vagrant box on arm64/Apple Silicon (M1, M2 chips) with VMWare Fusion Pro as a provider

Starting a VM (Vagrant Box) on Apple Silicon/arm64/M-chips

  • Download and install Vagrant
brew tap hashicorp/tap
brew install hashicorp/tap/hashicorp-vagrant

You may notice that the binary is for Intel's amd64 architecture and not for arm64/Apple Silicon, but this should work since Apple uses a translation layer called Rosetta 2 that will allow it to work.

vagrant plugin list
vagrant plugin install vagrant-vmware-desktop
vagrant plugin list
  • Install the vagrant-disksize plugin to customize the disk size
vagrant plugin install vagrant-disksize
  • Download and start the vagrant box
vagrant init bento/ubuntu-24.04 --box-version 202404.26.0
  • Set disk size. Open the generated Vagrantfile and find the lines that have:
Vagrant.configure("2") do |config|
  config.vm.box = "bento/ubuntu-24.04"
  config.vm.box_version = "202404.26.0"

and add the desired disk size and memory size as follows:

Vagrant.configure("2") do |config|
  config.vm.box = "bento/ubuntu-24.04"
  config.vm.box_version = "202404.26.0"
  config.vm.disk :disk, size: "20GB", primary: true
  config.vm.provider :vmware_desktop do |vmware|
    vmware.vmx["memsize"] = "1024"
  end

Even if you do not want to set the disk size or memory size, make sure that you set the provider as VMware instead of VirtualBox in your Vagrantfile.

  • Start the Vagrant box
vagrant up
  • SSH into the Vagrant box
vagrant ssh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment