gpt4 book ai didi

vagrant - 无法获得干净的 Vagrant Box "Remove"或 "Destroy"

转载 作者:行者123 更新时间:2023-12-01 14:15:21 38 4
gpt4 key购买 nike

我在 Windows 10 上使用 Vagrant 1.8.1。当试图移除或销毁一个盒子时,我得到了这些相互矛盾的结果:

baria@DESKTOP-057K4L5 /c/repos/hub/vtc/linphone-windows-dependencies
$ vagrant box list
hashicorp/precise64 (virtualbox, 1.1.0)
windows_2012_r2_core (virtualbox, 0)

baria@DESKTOP-057K4L5 /c/repos/hub/vtc/linphone-windows-dependencies
$ vagrant box remove windows_2012_r2_core
Box 'windows_2012_r2_core' (v0) with provider 'virtualbox' appears
to still be in use by at least one Vagrant environment. Removing
the box could corrupt the environment. We recommend destroying
these environments first:

vagrant-windows-2012-r2-core (ID: 00d3488f41fa40998bfe16ada2ebfd31)

Are you sure you want to remove this box? [y/N] N

baria@DESKTOP-057K4L5 /c/repos/hub/vtc/linphone-windows-dependencies
$ vagrant destroy windows_2012_r2_core
The machine with the name 'windows_2012_r2_core' was not found configured for
this Vagrant environment.

我在谷歌上搜索了“Vagrant 环境”是什么的解释,但一无所获。所以我不知道如何“破坏环境”。

即便如此,我还是希望 destroy命令确认我的存在 windows_2012_r2_core框,鉴于 listremove命令确认它的存在。

这里发生了什么?我如何干净地摆脱这个盒子,没有警告或错误?

最佳答案

您可以销毁引用的 VM vagrant destroy 00d3488f41fa40998bfe16ada2ebfd31将销毁正在使用此框的 VM,然后您就可以移除该框。

正如@Brandon Davis 提到的,你可以运行 vagrant global-status查看创建的 vagrant VM 列表(来自 vagrant 1.6+),您会看到哪个 VM 是 00d3488f41fa40998bfe16ada2ebfd31

关于vagrant - 无法获得干净的 Vagrant Box "Remove"或 "Destroy",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35616276/

38 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com