vagrant - 如何删除 vagrant 快照

标签 vagrant virtualbox

在 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/

相关文章:

Vagrant 盒子添加vs. Vagrant init?

compass-sass - ' compass watch '不会在 Vagrant 中重新生成CSS

linux - Tomoyo 个人资料不存在

android - 多个网络 - React Native 在安装 Virtualbox/Vmware 时选择了错误的 ip

linux - Virtualbox 启动挂载不会卸载

linux - Linux 虚拟机是否安装在 VirtualBox "real"linux 中的 Windows 主机上?

virtualbox - Virtual Box 错误 - (VERR_NOT_SUPPORTED) for\Users\name\Downloads\xubuntu-12.10-desktop-i386.iso.torrent 图像文件

jenkins - 使用 Ansible 安装 Jenkins 插件告诉我面包屑值无效

bash - 如何在我的控制台中显示 Opscode Chef bash 命令的输出?

java - 如何使用 Vagrant 连接两个虚拟机(postgreSQL 和 tomee)?