在 vagrant 多机设置中,我最终为 VM 获得了 2 个同名快照。我认为用同名再次保存会覆盖。现在我想删除其中一个,但是当我给出名字时,我得到了
➜ vagrant vagrant snapshot list trusty
my-pkg_1.0
my-pkg_1.0
➜ vagrant vagrant snapshot delete trusty 'my-pkg_1.0'
Progress: 0%There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.
Command: ["snapshot", "11ea7bf9-717c-453d-91e3-4185cec6be92", "delete", "my-pkg_1.0"]
Stderr: VBoxManage: error: Snapshot 'my-pkg_1.0' of the machine 'vagrant_trusty_1482140927350_10789' cannot be deleted, because it is the current snapshot and has one child snapshot
VBoxManage: error: Details: code VBOX_E_INVALID_OBJECT_STATE (0x80bb0007), component SessionMachine, interface IMachine, callee nsISupports
VBoxManage: error: Context: "DeleteSnapshot(bstrSnapGuid.raw(), pProgress.asOutParam())" at line 421 of file VBoxManageSnapshot.cpp
最佳答案
您可以通过运行直接从 vboxmanage CLI 删除
$ vboxmanage list vms --> this list all your VM with name and UUID
$ vboxmanage snapshot <virtualbox_vm_name> list --> this list the snapshot with vbox name and snapshot UUID
$ vboxmanage snapshot <virtualbox_vm_name> delete <snapshot_UUID_from_previous_command>
关于vagrant - 如何删除 vagrant 快照,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41259281/