Vagrant provide you to isolate your development environment, Helps you not dirty your machine. To run vagrant in M1 you need to install the vagrant first, as well as VMware fusion hypervisor. Virtualbox only supports intel-based process architecture.

Steps:

  1. First, you need to install VMware fusion driver plugin
vagrant plugin install vagrant-vmware-desktop
  1. Next, we create VagrantFile the Ubuntu VM.
Vagrant.configure("2") do |config|
  config.vm.box = "hashicorp/precise64"
end
  1. Hit vagrant up
  2. Hit vagrant ssh