Vagrant setup in MAC m1

Virtualbox is not yet released for mac m1. in this case vagrant setup becomes challenging in m1. but there is one alternative of virtualbox that is vmware

Steps to setup vagrant.

  1. Install vagrant brew install vagrant
  2. Download and install vmware-fusion Vmware-fusion-arm-64
  3. Download and Install vagrant vmware utility vagrant-vmware-utility
  4. Install vagrant-vmware-desktop plugin using following command
    vagrant plugin install vagrant-vmware-desktop
    
  5. Symlink vmware fusion tech preview with vmware fusion.
    ln -s /Applications/VMWare\ Fusion\ Tech\ Preview.app /Applications/VMWare\ Fusion.app
    
  6. Create a file named Vagrantfile
      Vagrant.configure(2) do |config|
        config.vm.box = "spox/ubuntu-arm"
        config.vm.provider "vmware_desktop" do |vb|
           vb.gui = true
           vb.memory = "2048"
      end
    
  7. Start vagrant using following command.
    vagrant up
    
  8. ssh into vagrant box. (if password required use vagrant)
    vagrant ssh
    
  9. stop the running machine.
    vagrant halt