我会尝试这个命令:
vagrant init hashicorp/percise32 && vagrant up
但是这个错误发生了
The box 'hashicorp/percise32' could not be found or
could not be accessed in the remote catalog. If this is a private
box on HashiCorp's Atlas, please verify you're logged in via
`vagrant login`. Also, please double-check the name. The expanded
URL and error message are shown below:
URL: ["https://atlas.hashicorp.com/hashicorp/percise32"]
Error: The requested URL returned error: 404 Not Found
答案 0 :(得分:1)
尝试以下
vagrant box add hashicorp/precise32
然后尝试
vagrant init
你应该在你的流浪文件中引用你的盒子:
# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "hashicorp/precise32"
# The url from where the 'config.vm.box' box will be fetched if it
# doesn't already exist on the user's system.
config.vm.box_url = "https://atlas.hashicorp.com/hashicorp/boxes/precise32/versions/1.0.0/providers/virtualbox.box"
然后
vagrant up
如果这没有帮助,但不建议在第一步尝试这个:
vagrant box add hashicorp/precise32 https://atlas.hashicorp.com/hashicorp/boxes/precise32/versions/1.0.0/providers/virtualbox.box
希望有所帮助
答案 1 :(得分:1)
这是完整有效的语法,你刚刚在名字上拼错了
vagrant init hashicorp/precise32 && vagrant up
注意 exact32 vs percise32
vagrant init hashicorp/precise32
创建一个带有框名称的vagrantfile。当您从此Vagrantfile运行vagrant up
时,vagrant将从文件引用的框中创建VM,如果找不到,则会下载该框