Summary:
- QEMU: ✅ (but few boxes)
- libvirt: ❎ (suggestions welcome!)
- Parallels: ✅ (but few boxes)
- VMWare Fusion: ✅ (but few boxes)
- VirtualBox: ❎ (timeout)
brew install hashicorp/tap/hashicorp-vagrant
brew install qemu
vagrant plugin install vagrant-qemu
vagrant init perk/debian-11-genericcloud-arm64
vagrant up --provider qemu
vagrant ssh
Unfortunately, there are very few QEMU ARM64 boxes at this time.
See also:
- https://github.com/ppggff/vagrant-qemu
- https://app.vagrantup.com/perk/boxes/debian-11-genericcloud-arm64
- QEMU ARM64 boxes
brew install hashicorp/tap/hashicorp-vagrant
brew install libiconv gcc qemu libvirt
brew install iproute2mac # The libvirt Vagrant plugin expects the ip command. This packages provides a similar API. See also: https://superuser.com/a/898971
The following command failed:
$ vagrant plugin install vagrant-libvirt
[...]
Vagrant failed to install the requested plugin because development tools
are required for installation but are not currently installed on this
machine. Please install development tools and then try this command
again.
[...]
The following command failed:
$ NOKOGIRI_USE_SYSTEM_LIBRARIES=1 \
CONFIGURE_ARGS="with-libvirt-include=$(brew --prefix libvirt) with-libvirt-lib=$(brew --prefix libvirt)" \
vagrant plugin install --verbose --debug vagrant-libvirt
[...]
Vagrant failed to install the requested plugin because development tools
are required for installation but are not currently installed on this
machine. Please install development tools and then try this command
again.
[...]
The following steps are inspired from: vagrant-libvirt/vagrant-libvirt#1205 (comment)
$ brew install grpc # ... as bundle initially failed as it required some gRPC libraries
$ ruby --version
ruby 3.2.1 (2023-02-08 revision 31819e82c8) [arm64-darwin21]
$ git clone [email protected]:hashicorp/vagrant.git # HEAD: f33ac0bc98bd
$ cd vagrant
$ git apply <<EOF
diff --git a/vagrant.gemspec b/vagrant.gemspec
index 80b54bacc..7ef7a32c0 100644
--- a/vagrant.gemspec
+++ b/vagrant.gemspec
@@ -20,7 +20,7 @@ Gem::Specification.new do |s|
s.add_dependency "ed25519", "~> 1.3.0"
s.add_dependency "erubi"
s.add_dependency 'googleapis-common-protos-types', '~> 1.3'
- s.add_dependency "grpc", "~> 1.56.0"
+ s.add_dependency "grpc", "~> 1.59.0"
s.add_dependency "hashicorp-checkpoint", "~> 0.1.5"
s.add_dependency "i18n", "~> 1.12"
s.add_dependency "listen", "~> 3.7"
EOF
$ bundle config set --local deployment 'true'
$ bundle install
$ CONFIGURE_ARGS="with-libvirt-lib=$(brew --prefix libvirt)/lib with-libvirt-include=$(brew --prefix libvirt)/include" bundle exec vagrant plugin install vagrant-libvirt
$ bundle --binstubs exec
$ ls -al $(which vagrant)
lrwxr-xr-x 1 root admin 24 Oct 20 04:06 /usr/local/bin/vagrant -> /opt/vagrant/bin/vagrant
$ sudo ln -sf "${PWD}/exec/vagrant" /usr/local/bin/vagrant
Edit $(brew --prefix)/etc/libvirt/libvirtd.conf
and uncomment:
unix_sock_ro_perms = "0777"
unix_sock_rw_perms = "0770"
unix_sock_admin_perms = "0700"
unix_sock_dir = "/opt/homebrew/var/run/libvirt"
But... the next step failed:
brew services start libvirt
brew install virt-manager
virt-manager -c "qemu:///session?socket=/opt/homebrew/var/run/libvirt/libvirt-sock" --no-fork
vagrant init debian/bullseye64
Edit Vagrantfile
to point to the above socket. The configuration should look like this:
Vagrant.configure("2") do |config|
config.vm.box = "debian/bullseye64"
config.vm.provider :libvirt do |libvirt|
libvirt.uri = "qemu:///session"
libvirt.socket = "/opt/homebrew/var/run/libvirt/libvirt-sock"
end
end
Run:
vagrant up --provider=libvirt
In my case, the above failed with:
missing interpolation argument :error_message in "Error while connecting to Libvirt: %{error_message}" ({:_key=>:fog_libvirt_connection_error, :_namespace=>"vagrant_libvirt.errors"} given) (I18n::MissingInterpolationArgument)
on these lines: https://github.com/vagrant-libvirt/vagrant-libvirt/blob/448ed69f0ccbe8557157644a0ebd8809b35d5b71/lib/vagrant-libvirt/driver.rb#L221-L231
N.B.: given that there are no libvirt
ARM64 boxes available (see here)
it is unclear if this solution would have worked anyway.
See also:
- https://github.com/vagrant-libvirt/vagrant-libvirt
- https://vagrant-libvirt.github.io/vagrant-libvirt/
- https://vagrant-libvirt.github.io/vagrant-libvirt/installation.html
- https://vagrant-libvirt.github.io/vagrant-libvirt/configuration.html
sudo ln -sf /opt/vagrant/bin/vagrant /usr/local/bin/vagrant
brew services stop libvirt
vagrant plugin repair
vagrant plugin expunge --reinstall
vagrant plugin update
brew install hashicorp/tap/hashicorp-vagrant
vagrant plugin install vagrant-parallels
vagrant plugin update vagrant-parallels
vagrant init "${PARALLELS_ARM64_BOX}"
vagrant up --provider=parallels
vagrant ssh
Unfortunately, there are very few Parallels ARM64 boxes at this time. But the above worked with:
export PARALLELS_ARM64_BOX=luminositylabsllc/bento-ubuntu-22.04-arm64
See also:
- Go to https://www.vmware.com/products/fusion/fusion-evaluation.html.
- Select "Register for a personal use license".
- Optional: Create an account if you do not have one already.
- Select "Login" > "Customer Connect".
- Go to https://www.vmware.com/products/fusion/fusion-evaluation.html again.
- Select "License & Download".
- Download the latest "VMware Fusion xx.x.x (for Intel-based and Apple silicon Macs)" (E.g.
VMware-Fusion-13.5.0-22583790_universal.dmg
) - Install. Start. Enter your personal use license.
- Run the following commands:
brew install hashicorp/tap/hashicorp-vagrant
brew install --cask vagrant-vmware-utility
vagrant plugin install vagrant-vmware-desktop
vagrant plugin update vagrant-vmware-desktop
vagrant init gyptazy/debian11.8-arm64 --box-version 1.0.0
vagrant up --provider=vmware_desktop
# OR:
# vagrant up --provider=vmware_fusion
# You may get the following error:
# The following SSH command responded with a non-zero exit status.
# Vagrant assumes that this means the command failed!
# Ignore it, and run:
vagrant ssh
Unfortunately, there are very few VMware ARM64 boxes at this time. See also:
- Download VirtualBox v7.0.8-beta "Developer preview for macOS / Arm64 (M1/M2) hosts". N.B.: There will be no upgrade nor support going forward.
- Run the following commands:
brew install hashicorp/tap/hashicorp-vagrant
vagrant init debian/bullseye64
vagrant up --provider virtualbox
This did NOT succeed and timed out on VM creation.