> ## Content Index
> Fetch the complete content index at: https://devopscube.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# Build VMs on Mac M1/M2 with Vagrant & VMware Fusion
- URL: https://devopscube.com/build-vms-mac-silicon-with-vagrant/
- Published: 2024-02-26T10:58:43.000Z
- Updated: 2025-03-15T05:51:13.000Z
- Author: Bibin Wilson
- Tags: DEVOPS, #Migrated-1741795015845, #wp, #wp-post, #Import 2025-03-12 15:57, #blog

MAC silicon M1/M2 chips use ARM architecture which is different from x86 used by Intel processors.

The only solution to run virtual machines on mac silicon is using VMware fusion and Vagrant. I have tried [Virtualbox](https://devopscube.com/virtual-box-tutorial/) and it doesnt work well and you dont find good ARM based vagrant boxes that has support for Virtual box.

**Virtual box + Vagrant** works great on my MAC intel based system. But for my MAC silicon, I use VMware Fusion + vagrant and it works great.

In this blog I will walk you through step by step process of setting up VMware fusion and vagrant to create VMs.

## Prerequisites

Following are the prerequisites for this setup.

1. macOS (M1/M2) with admin access.
2. [Homebrew](https://brew.sh/?ref=devopscube.com)

## Setting Up VMware Fusion

Since Broadcom acquired Vmware, we have to download it form the Broadcom website.

VMware Fusion pro can be used for free with the personal free licence. Follow the steps given below to setup VMware Fusion.

**Step 1:** Register for the [Broadcom Account](https://support.broadcom.com/group/ecx/productdownloads?subfamily=VMware+Fusion&ref=devopscube.com). You need this account to download softwares from the Broadcom website.

**Step 2:** Download and install [VMware Fusion Pro Personal](https://support.broadcom.com/group/ecx/productdownloads?subfamily=VMware+Fusion&ref=devopscube.com)

![Vmware Fusion pro download from Broadcom website](https://storage.ghost.io/c/5f/2f/5f2f4d20-2abf-4534-8d40-7aa233aedd43/content/images/2025/03/image-268.png)

Follow the installation wizard. All are self explanatory steps.

****Important Note:** When asked for licence, choose the personal licence option so that you dont have to provide any licence key.

You can cancel the final installation method as we will be managing the VMs using Vagrant

![cancel the final installation for VMware fusion to use vagrant](https://storage.ghost.io/c/5f/2f/5f2f4d20-2abf-4534-8d40-7aa233aedd43/content/images/2025/03/image-80-9.png)

## Setting Up Vagrant & Related Utiltities

[Vagrant](https://devopscube.com/vagrant-tutorial-beginners/) is a open source wrapper utiltiy that interacts with VMWare Fusion to create and manager virtual machines.

Follows the steps to install vagrant and VMWare related vagrant utilties.

### **Step 1:** Install vagrant from the [Downloads page](https://developer.hashicorp.com/vagrant/downloads?ref=devopscube.com)

If you have homebrew, you can install it using the following commands.

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

### **Step 2:** Install Vagrant VMware Utility

Download and install the [VMware Vagrant Utilty](https://developer.hashicorp.com/vagrant/install/vmware?ref=devopscube.com)[ ](http://Vagrant VMware Utility)for MAC

![MAC Vagrant VMware Utility ](https://storage.ghost.io/c/5f/2f/5f2f4d20-2abf-4534-8d40-7aa233aedd43/content/images/2025/03/image-108-8.png)

### **Step 3:** Install VMware Provide plugin using the vagrant command.

```
sudo vagrant plugin install vagrant-vmware-desktop
```

### Step 4: Restart Your System

Once all the above mentioned installations are done, restart your MAC.

If you dont restart your MAC, you will get the following error.

```
Vagrant failed to create a new VMware networking device. The following
error message was generated while attempting to create a new device:

  Failed to enable device

Please resolve any problems reported in the error message above and
try again.
```

## Building a VM with Vagrant

To test the setup, you can clone the [Kubernetes certification repo](https://github.com/techiescamp/kubernetes-certification-guide?ref=devopscube.com) where we have the Vagrantfile to deploy three VMs.

```
git clone https://github.com/techiescamp/kubernetes-certification-guide.git
```

cd in the the mac silicon folder. It has a Vagrantfile with **bento/ubuntu-22.04**  vargantbox for arm architecture that deploys three VM's. You can modify the VM details in the **settings.yaml** file present in the folder.

```
cd lab-setup/mac-silicon
```

Now, bring up the VMs using vagrant.

****Important Note:** Ensure you use sudo with the command. Without sudo, it wont work.

```
sudo vagrant up
```

It should bring up three VMs.

## Using the VM

To login to specific VM, use the node name with ssh.

To get the node names, execute,

```
$ sudo vagrant status

Current machine states:

controlplane              running (vmware_fusion)
node01                    running (vmware_fusion)
node02                    running (vmware_fusion)
```

Use the machine names to ssh. For example,

```
sudo vagrant ssh controlplane
```

Top stop the VMs,

```
sudo vagrant halt
```

To bring up the VMs again, run

```
sudo vagrant up
```

## Conclusion

Vagrant is a great utility for running VMs locally on MAC silicon.

You can setup multi node applications, [kubeadm kubernetes clusters](https://devopscube.com/setup-kubernetes-cluster-kubeadm/) etc that closely replicates the production systems.

If you face any errors during the setup, drop a comment. We will look at it.