VirtualBox

Opened 15 years ago

Last modified 8 years ago

#2943 closed defect

Snapshotted virtual machine cannot be deleted — at Version 2

Reported by: Emrah Gunduz Owned by:
Component: virtual disk Version: VirtualBox 2.1.0
Keywords: removing, deleting, snapshot, child hard disk Cc:
Guest type: other Host type: Windows

Description (last modified by Frank Mehnert)

OS: Windows XP x64 Edition Version 2003 Service Pack 2
Computer: AMD Athlon 64 x2 Dual 4600+

While trying to delete a virtual machine which has a snapshot saved, VirtualBox throws this error (I changed the machine name, and disk location information with dummy text):

Cannot unregister the machine 'Machine name' because it has 1 snapshots.
Result Code: VBOX_E_INVALID_OBJECT_STATE (0x80BB0007)

It is not possible to discard a snapshot after this error. The new error is this :

Hard disk 'Disk location' has more than one child hard disk (2)
Result Code: E_FAIL (0x80004005)
Component: Harddisk1

Trying to revert to the "current state" and trying to discard the snapshot also creates an error, and creates a new hard disk child :

Hard disk 'Disk location' has more than one child hard disk (3)
Result Code: E_FAIL (0x80004005)
Component: Harddisk2

Virtual Media Manager lists 3 VDI files under the main VDI of the virtual machine with same virtual sizes, but only with 80,50 KB usages.

Trying to release the child hard disks, whatever the snaphot condition is, results in another error :

The machine is not mutable (state is 2)
Result Code: VBOX_E_INVALID_VM_STATE (0x80BB0002)
Component: Machine

If you delete the snapshot files/folder by hand, you still can not delete the snapshot from the VirtualBox. You just receive a "file not found" error. However, it is now possible to delete the locked child hard disk. After this point, you can remove the snapshot, and remove the virtual machine completely.

A summary:

  1. Snapshotted virtual machine cannot be deleted.
  2. Discarding a snapshot results in duplicated hard disk.
  3. Reverting and trying to discarding a snapshot results in another duplicated hard disk.
  4. After this point, snapshots cannot be discarded or reverted.
  5. One of the child hard disks can not be deleted or released regardless of the snapshot status by using Virtual Media Manager.
  6. Deleting snapshots by hand results in file not found error.
  7. After deleting snapshot files, removing the child hard disk, snapshots and virtual machine in this order is possible.

PS: Removing a virtual machine has to be simpler, and less complicated for the user. The process has to be automatic, and file removal must be asked to user. Throwing errors is not a good way.
PSS: It is not possible to copy/paste the text from the error screens in Windows Xp x64

Change History (2)

comment:1 by zhj1028, 15 years ago

删除备份文件后 就能正常删除了

comment:2 by Frank Mehnert, 15 years ago

Description: modified (diff)
Guest type: Windowsother

zhj1028, please post in English. Thank you!

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use