hashicorp / vagrant

Vagrant is a tool for building and distributing development environments.
https://www.vagrantup.com
Other
26.21k stars 4.43k forks source link

box_version-constraint does not match published box #13311

Closed alexgit2k closed 9 months ago

alexgit2k commented 9 months ago

Expected behavior

Starting Rocky Linux 9 VM

Actual behavior

Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'rockylinux/9' could not be found. Attempting to find and install...
    default: Box Provider: virtualbox
    default: Box Version: 3.0.0
==> default: Loading metadata for box 'rockylinux/9'
    default: URL: https://vagrantcloud.com/api/v2/vagrant/rockylinux/9
The box you're attempting to add has no available version that
matches the constraints you requested. Please double-check your
settings. Also verify that if you specified version constraints,
that the provider you wish to use is available for these constraints.

Box: rockylinux/9
Address: https://vagrantcloud.com/api/v2/vagrant/rockylinux/9
Constraints: 3.0.0
Available versions: 1.0.0, 2.0.0, 3.0.0

Reproduction information

Vagrant version

Vagrant 2.4.0

Host operating system

Rocky Linux 9

Guest operating system

Windows 10

Steps to reproduce

  1. vagrant init --box-version 3.0.0 --minimal rockylinux/9
  2. vagrant up

Vagrantfile

# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|
  config.vm.box = "rockylinux/9"
  config.vm.box_version = "3.0.0"
end

Notes

Box rockylinux 9 version 3.0.0 is available: https://app.vagrantup.com/rockylinux/boxes/9/versions/3.0.0

alexgit2k commented 9 months ago

Solved this by adding config.vm.box_architecture = "amd64". Virtualbox us using "unknown" by default.