Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement Request: Vagrant for aarch64 and other architectures #12548

Open
AlexBaranowski opened this issue Oct 21, 2021 · 26 comments
Open

Enhancement Request: Vagrant for aarch64 and other architectures #12548

AlexBaranowski opened this issue Oct 21, 2021 · 26 comments

Comments

@AlexBaranowski
Copy link

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.

@odidev
Copy link

odidev commented Oct 27, 2021

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.

@ju2wheels
Copy link

ju2wheels commented Jan 24, 2022

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.

@fredngo
Copy link

fredngo commented Mar 8, 2022

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.

@trinitronx
Copy link

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.

@jhgorse
Copy link

jhgorse commented Mar 31, 2022

Also interested in aarch64-darwin builds so we do not need rosetta emulation.

@trinitronx
Copy link

Bumping issue to avoid the dessant/lock-threads bot 🤖 closing it prematurely...

@trinitronx
Copy link

trinitronx commented May 10, 2022

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.

Status update on all the dependencies needed to get this working with the libvirt provider can be found here

@fredngo
Copy link

fredngo commented May 19, 2022

If anyone has a workaround, please let me know.

Here's my workaround to detect whether we're using Rosetta or not: #12610 (comment)

@trinitronx
Copy link

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'

@wwkimball
Copy link

I'm just chipping in to keep this alive. Please build Vagrant natively for ARM. In my case, I'm on Apple M2.

@ReubenBTalbott
Copy link

Same here, Apple M2 Pro. an ARM build would fix the VMware-Desktop plugin headless issues.

@trinitronx
Copy link

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.

@jimsmith
Copy link

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

@ReubenBTalbott
Copy link

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
Copy link

jimsmith commented May 17, 2023

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.....
#12825 (comment)

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.

@ReubenBTalbott
Copy link

ReubenBTalbott commented May 17, 2023

@jimsmith it looks like the vagrant-go binary is still AMD64. Everything else is ARM64: Screenshot 2023-05-17 at 9 57 05 AM

@ReubenBTalbott
Copy link

ReubenBTalbott commented May 17, 2023

Also @jimsmith are you downloading the right installer? There is a separate one for ARM:
Screenshot 2023-05-17 at 10 01 42 AM https://developer.hashicorp.com/vagrant/downloads

@ReubenBTalbott
Copy link

I'd try running it without rosetta but I'm not sure how to force that.

@jimsmith
Copy link

Also @jimsmith are you downloading the right installer? There is a separate one for ARM: Screenshot 2023-05-17 at 10 01 42 AM https://developer.hashicorp.com/vagrant/downloads

@ReubenBTalbott thanks yes I am as per my screenshots (here #12825 (comment))

I've downloaded ARM64 version: https://releases.hashicorp.com/vagrant/2.3.5/vagrant_2.3.5_darwin_arm64.dmg

image

And this happens:
image

@ReubenBTalbott
Copy link

@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?

@nitind
Copy link

nitind commented May 17, 2023

I've downloaded ARM64 version: https://releases.hashicorp.com/vagrant/2.3.5/vagrant_2.3.5_darwin_arm64.dmg

image

The names are very similar, and the dialog shows you downloaded AMD, not ARM.

@jimsmith
Copy link

jimsmith commented May 17, 2023

@ReubenBTalbott because of these :)

#12825 (comment)
#12825 (comment) (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.

@jimsmith
Copy link

jimsmith commented May 17, 2023

I was testing out both versions earlier, here's the vagrant_2.3.5_darwin_arm64.dmg

confirmed it's the arm64 installer.

239029010-5172844b-fdcb-4177-88e4-82260705ca74

@jmgurney
Copy link

As I point out in: #12825 (comment)

I see the same dialog as @jimsmith when trying to install.

@jimsmith
Copy link

@chrisroberts
Copy link
Member

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests