dev-resources.site
for different kinds of informations.
Run Vagrant VMs in a M1/M2/M3 Apple Sillicon Chip
Published at
2/18/2024
Categories
vagrant
hashicorp
mac
vmware
Author
houssambourkane
Author
15 person written this
houssambourkane
open
If you're a Mac user equipped with an Apple Silicon chip (M1/M2/M3...) and facing challenges setting up a Vagrant infrastructure due to the lack of supported hypervisors, this tutorial is tailored for you. It will guide you through configuring Vagrant to run using VMware Fusion technology as a hypervisor. Simply follow the steps outlined, and should you encounter any issues along the way, feel free to reach out to me for assistance.
Step 1: Install Rosetta
/usr/sbin/softwareupdate --install-rosetta --agree-to-license
Step 2: Install VMware Fusion tech (you will have to create a VMware account)
https://customerconnect.vmware.com/downloads/get-download?downloadGroup=FUS-TP2023
You may also need to provide a license key, you can opt for the free one.
Step 3: Create a symbolic link
ln -s /Applications/VMWare\ Fusion\ Tech\ Preview.app /Applications/VMWare\ Fusion.app
Step 4: Install vagrant (on MacOS)
brew tap hashicorp/tap
brew install hashicorp/tap/hashicorp-vagrant
Step 5: Install vagrant vmware utility
https://releases.hashicorp.com/vagrant-vmware-utility/1.0.22/vagrant-vmware-utility_1.0.22_darwin_amd64.dmg
Step 6: Install vagrant plugin
vagrant plugin install vagrant-vmware-desktop
Step 7: Create a Vagrantfile
This configuration will create 2 VMs (master and slave)
mkdir vagrant-project
cd vagrant-project
touch Vagrantfile
cat << EOF > Vagrantfile
Vagrant.configure("2") do |config|
config.vm.define "master" do |master|
master.vm.box = "spox/ubuntu-arm"
master.vm.box_version = "1.0.0"
master.vm.hostname = 'master'
master.vm.provision "docker"
master.vm.network :private_network, ip: "192.168.56.101"
master.vm.provider "vmware_desktop" do |v|
v.allowlist_verified = true
v.gui = false
v.vmx["memsize"] = "2048"
v.vmx["numvcpus"] = "2"
end
end
config.vm.define "slave" do |slave|
slave.vm.box = "spox/ubuntu-arm"
slave.vm.box_version = "1.0.0"
slave.vm.hostname = 'slave'
slave.vm.provision "docker"
slave.vm.network :private_network, ip: "192.168.56.102"
slave.vm.provider "vmware_desktop" do |v|
v.allowlist_verified = true
v.gui = false
v.vmx["memsize"] = "2048"
v.vmx["numvcpus"] = "2"
end
end
end
EOF
Note: gui parameter is mandatory
Step 8: Now you can run the vagrant program
vagrant up
Additional commands
Check the status of the VMs
vagrant status
Connect to the VMs
vagrant ssh <hostname>
In our example we can use either
vagrant ssh master
Or
vagrant ssh slave
Stop the VMs
vagrant halt
Delete the VMs
vagrant destroy
hashicorp Article's
30 articles in total
What is HashiCorp Vault? Features, Benefits, and Know How Does it Work
read article
Nomad 101: The Simpler, Smarter Way to Orchestrate Applications
read article
Vault Secret Engines: A Guide to HashiCorp Vault's Path to Secure Secrets Management
read article
HashiCorp Vault: Unlocking the Essentials of Secrets Management
read article
S3 Cross region replication with Terraform stacks
read article
Two Years in the Vault: 4 Best Practices 🔒
read article
Terraform Authoring and Operations Professional certification
read article
Managing Terraform State for AWS workloads with v1.10.0-beta1
read article
[Top-2024]! HashiCorp Terraform-Associate-003 Practice Exam To Prepare Yourself
read article
Vault CLI in Containers
read article
Introduction to Vault
read article
What is HashiCorp Vault?
read article
Mastering Terraform testing, a layered approach to testing complex infrastructure
read article
Hashicorp Boundary with Azure SQL Server
read article
Centralized TLS Certificate Management with HashiCorp Vault PKI and Cert Manager
read article
Run Vagrant VMs in a M1/M2/M3 Apple Sillicon Chip
currently reading
Terraform Cloud Agents - Podman
read article
The Reluctant Software Developer: Contributing to HashiCorp Vault
read article
Terraform is making my day impossible
read article
Deploy a HashiCorp Vault in Minutes using Spheron Compute
read article
Mastering Terraform: Best Practices for Scalable, Secure, and Reliable Infrastructure as Code
read article
Test permutations with Terraform and GitHub Actions
read article
Terraform Cloud Project Bootcamp with Andrew Brown - Creating a command alias
read article
Testing Framework in Terraform 1.6: A deep-dive
read article
Terraform Cloud Project Bootcamp with Andrew Brown - Configuring Terraform & AWS CLI on Gitpod
read article
Terraform Cloud Project Bootcamp with Andrew Brown - Week 0, 1 & 2 Journal
read article
Infrastructure as Code - HashiCorp Terraform
read article
What is HashiCorp Terraform?
read article
HashiCorp Developer AI
read article
A Comprehensive Guide to Testing in Terraform: Keep your tests, validations, checks, and policies in order
read article
Featured ones: