vagrant
vagrant copied to clipboard
Enhancement Request: Vagrant for aarch64 and other architectures
Add aarch64 support for Vagrant
I'm trying to find Vagrant for aarch64 (I'm using EL 8):
https://rpm.releases.hashicorp.com/RHEL/8/aarch64/stable/repodata/repomd.xml - returns 404 https://rpm.releases.hashicorp.com/RHEL/8/x86_64/stable/repodata/repomd.xml - returns 200 with repomd.xml file (this is a file that describes RPM-based repository).
The very same thing is with Fedora:
https://rpm.releases.hashicorp.com/fedora/34/aarch64/stable/repodata/repomd.xml - 404 https://rpm.releases.hashicorp.com/fedora/34/x86_64/stable/repodata/repomd.xml - OK
I would love to see Vagrant on different architectures than x86_64. It could start with aarch64.
There is also the following problem - the app.vagrantup.com does not support multiple architectures.
In the company I'm working for, the Vagrant is one of the most essential QA tools. When we started our support for aarch64, we had to split our pipelines so that the x86_64 pipeline uses Vagrant when aarch64 and ppc64le don't.
Hi Team,
I am also interested in the Linux/ARM64 (aarch64) Vagrant support/binary-release/Docker-Images. May I know, do you have any plans for the same in the near future? If required, I will be happy to contribute.
Alternatively, if this is going to take a while, are there instructions for us to be able to run the vagrant compile and package routine ourselves locally instead of waiting? I would definitely like to try to get vagrant running on a Raspberry Pi using native packaging without having to go the local rvm route. The available upstream version in 18.04 is fairly old so its not as simple as adding official repo.
Yes, we need a native Vagrant build for arm64
.
In order to accommodate everyone on the team who have both Apple Silicon Macs and Intel Macs, I wanted to write something like this in my Vagrantfile
:
Vagrant.configure('2') do |config|
arch = `arch`
config.vm.box = if arch == 'arm64'
'whichever/ubuntu-server-20.04-arm64'
else if arch == 'i386'
'whichever/ubuntu-server-20.04-i386'
end
...
end
but I found out that since Vagrant
is running under Rosetta, the arch
command always returns i386
even when it's running on an Apple Silicon Mac, so I can't decide on the box at runtime!
If anyone has a workaround, please let me know.
If anyone has a workaround, please let me know.
I've been able to work around the issue by installing vagrant
and other ruby gems from source. While this works as a proof-of-concept... technically the issue, #12559, is not resolved. So, I recommend leaving this issue open until Hashicorp folks get around to providing an official native arm64
/ aarch64
build for Apple Silicon.
Also interested in aarch64-darwin builds so we do not need rosetta emulation.
Bumping issue to avoid the dessant/lock-threads
bot 🤖 closing it prematurely...
Bumping this issue, as #12559 was closed prematurely by the github-actions
bot
As described by @chrisroberts here, vagrant providers on arm64
are still in the stage of limited or no support. However, it is now possible to get vagrant-libvirt
working with full native support for arm64
on MacOS. It is also possible to use with VMWare Fusion Tech Preview.
If anyone has a workaround, please let me know.
Here's my workaround to detect whether we're using Rosetta or not: https://github.com/hashicorp/vagrant/issues/12610#issuecomment-1109906113
If anyone has a workaround, please let me know.
Here's my workaround to detect whether we're using Rosetta or not: #12610 (comment)
Here is another way to detect if running on Apple Silicon arm64
or Intel x86_64
. This implementation will return x86_64
when inside Rosetta, because it was designed to bootstrap the proper architecture according to whether the user is running it under Rosetta or not. However, you could still use both sysctl
values to detect the different hardware.
Here's a helpful "truth table" for those sysctl
values on each hardware arch with & without emulation:
sysctl Name |
Rosetta M1 Value | Native M1 Value | Intel Mac Value |
---|---|---|---|
hw.optional.x86_64 |
1 |
'' (empty string) |
1 |
hw.optional.arm64 |
1 |
1 |
sysctl: unknown oid 'hw.optional.arm64' |
sysctl.proc_translated |
1 |
0 |
sysctl: unknown oid 'sysctl.proc_translated' |
I'm just chipping in to keep this alive. Please build Vagrant natively for ARM. In my case, I'm on Apple M2.
Same here, Apple M2 Pro. an ARM build would fix the VMware-Desktop plugin headless issues.
Pinging this issue again in hopes to raise visibility.
It would help if we had any response from Hashicorp maintainers of Vagrant as to the roadmap & future support plans for arm64
/ Apple Silicon support.
In theory, the newer push towards vagrant-go
would be able to be compiled natively on Arm64. However, then the question remains: Whether ruby-based plugins will still work?
I still have a use-case for vagrant-libvirt
on Apple Silicon, running completely natively, as well as using qemu+ssh://
to launch QEMU / LibVirt VMs on a remote Linux host from a macOS developer workstation.
I stumbled on this issue and folks you want to check this out, however it doesn't work yet somehow it's closed off.
https://github.com/hashicorp/vagrant/issues/12825
I stumbled on this issue and folks you want to check this out, however it doesn't work yet somehow it's closed off.
https://github.com/hashicorp/vagrant/issues/12825
Brew must not have updated yet. If you download from the website it works on arm perfectly.
Hey @ReubenBTalbott can you share screenshots of the arm64 installing (without rosetta?)
as I downloaded it directly from the website and doesn't install as it requires rosetta so it's not a native installer.
Here's my screenshots showing it being downloaded from the website and requires Rosetta..... https://github.com/hashicorp/vagrant/issues/12825#issuecomment-1551448500
I stumbled on this issue and folks you want to check this out, however it doesn't work yet somehow it's closed off. #12825
Brew must not have updated yet. If you download from the website it works on arm perfectly.
@jimsmith it looks like the vagrant-go binary is still AMD64. Everything else is ARM64:
Also @jimsmith are you downloading the right installer? There is a separate one for ARM:
https://developer.hashicorp.com/vagrant/downloads
I'd try running it without rosetta but I'm not sure how to force that.
Also @jimsmith are you downloading the right installer? There is a separate one for ARM:
https://developer.hashicorp.com/vagrant/downloads
@ReubenBTalbott thanks yes I am as per my screenshots (here https://github.com/hashicorp/vagrant/issues/12825#issuecomment-1551448500)
I've downloaded ARM64 version: https://releases.hashicorp.com/vagrant/2.3.5/vagrant_2.3.5_darwin_arm64.dmg
And this happens:
@jimsmith interesting, the vagrant binary itself is ARM, so compiling from source might work for you if you can't use the installer. Question, why is installing rosetta a problem for you?
I've downloaded ARM64 version: https://releases.hashicorp.com/vagrant/2.3.5/vagrant_2.3.5_darwin_arm64.dmg
![]()
The names are very similar, and the dialog shows you downloaded AMD, not ARM.
@ReubenBTalbott because of these :)
https://github.com/hashicorp/vagrant/issues/12825#issuecomment-1440833354 https://github.com/hashicorp/vagrant/issues/12825#issuecomment-1440845771 (packer installs and runs natively on apple silicon M2) https://apple.stackexchange.com/questions/450541/drawbacks-to-apply-rosetta-to-all-apps
Also many organisations control Mac's on what software is allowed to be installed especially in controlled/regulated organisations wereby Rosetta 2 blocked by central IT due to organisations corporate IT Security policy.
I was testing out both versions earlier, here's the vagrant_2.3.5_darwin_arm64.dmg
confirmed it's the arm64 installer.
As I point out in: https://github.com/hashicorp/vagrant/issues/12825#issuecomment-1552130640
I see the same dialog as @jimsmith when trying to install.
When looking for vagrant-go
this repository https://github.com/hashicorp/vagrant-installers
This line shows as arm64 https://github.com/hashicorp/vagrant-installers/blob/main/.github/workflows/build-macos.yml#L113
And looking at the Github Action job it has not ran before: https://github.com/hashicorp/vagrant-installers/actions/workflows/dev-macos-installer.yml
Nor it seems has this Github Action https://github.com/hashicorp/vagrant-installers/actions/workflows/dev-macos-installer.yml
@chrisroberts will this be resolved please ?
Hi everyone,
This issue is related to architecture metadata support within the core of Vagrant, and not architecture supported by Vagrant installers. Please use #12825 for the latter. Thanks!