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

Vagrant doesn't work on Apple Silicon Macs because ubuntu/jammy64 is not an Arm image #6316

Open
master0v opened this issue Oct 3, 2024 · 2 comments

Comments

@master0v
Copy link

master0v commented Oct 3, 2024

I am following the instructions on this page: https://ardupilot.org/dev/docs/setting-up-sitl-using-vagrant.html

When I get to "vagrant up" step - it craps out due to the fact that Vagrant 2.4.1 doesn't support virtualbox Version 7.1.2 r164945 (Qt6.5.3). That can be fixed with the suggestion provided here: hashicorp/vagrant#13501

Once that is working, however, the fundamental problem is that the VM that it is trying to pull is built for the Intel architecture. Here is the full error message:

MacBook-Pro ardupilot % vagrant up --provider=virtualbox   
Bringing machine 'jammy' up with 'virtualbox' provider...
==> jammy: Checking if box 'ubuntu/jammy64' version '20240912.0.0' is up to date...
==> jammy: Clearing any previously set forwarded ports...
==> jammy: Clearing any previously set network interfaces...
==> jammy: Preparing network interfaces based on configuration...
    jammy: Adapter 1: nat
==> jammy: Forwarding ports...
    jammy: 22 (guest) => 2222 (host) (adapter 1)
==> jammy: Running 'pre-boot' VM customizations...
==> jammy: Booting VM...
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: ["startvm", "8ef543d5-204a-4df4-830f-d075932bdcd3", "--type", "headless"]

Stderr: VBoxManage: error: The VM session was aborted
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component SessionMachine, interface ISession

The same issue happens when I try to run the VM from the UI:

Screenshot 2024-10-03 at 11 13 09

Would it be possible to support this?
Thank you!

@peterbarker
Copy link
Contributor

From random googling, it may be possible by changing the machine from eg. ubuntu/jammy64 to perk/ubuntu-2204-arm64

https://portal.cloud.hashicorp.com/vagrant/discover/perk/ubuntu-2204-arm64

There may also be bento boxes to allow for it.

You might need to experiment a bit :-)

@master0v
Copy link
Author

master0v commented Oct 3, 2024

Forgive me for the dumb question, but how do you change it?

Simply replacing 'ubuntu/jammy64' with 'perk/ubuntu-2204-arm64' in Vagrantfile didn't work:

MacBook-Pro ardupilot % vagrant up --provider=virtualbox
Bringing machine 'jammy' up with 'virtualbox' provider...
==> jammy: Box 'perk/ubuntu-2204-arm64' could not be found. Attempting to find and install...
    jammy: Box Provider: virtualbox
    jammy: Box Version: >= 0
==> jammy: Loading metadata for box 'perk/ubuntu-2204-arm64'
    jammy: URL: https://vagrantcloud.com/api/v2/vagrant/perk/ubuntu-2204-arm64
The box you're attempting to add doesn't support the provider
you requested. Please find an alternate box or use an alternate
provider. Double-check your requested provider to verify you didn't
simply misspell it.

If you're adding a box from HashiCorp's Vagrant Cloud, make sure the box is
released.

Name: perk/ubuntu-2204-arm64
Address: https://vagrantcloud.com/api/v2/vagrant/perk/ubuntu-2204-arm64
Requested provider: virtualbox (arm64)

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

No branches or pull requests

2 participants