Error when deleting snapshot?

This is for discussing general topics about how to use VirtualBox.
Post Reply
jvsrvcs
Posts: 38
Joined: 26. Oct 2011, 02:53
Primary OS: MS Windows 7
VBox Version: OSE self-compiled
Guest OSses: Android

Error when deleting snapshot?

Post by jvsrvcs »

I create a snapshot while the machine was down, started, then logged in, did some stuff and then shutdown again, then a snapshot then started and tried to delete the first snapshot and I get this error:

How did I get more than one child hard disk? The snapshot I am trying to delete has one snapshot under it and then "Changed State". That's it. What went wrong? Is there any way out of this?
I really need to delete the snapshot.

---
Failed to delete the snapshot <snapshot name> of the virtual machine <vm name>.

Hard disk 'E:\vbox\<vm_name>\Snapshots/{7afdc9a5-f89a-4ffa-a3b1-c4ab4b30b23b}.vdi' has more than one child hard disk (2).

Result Code: E_FAIL (0x80004005)
Component: SessionMachine
Interface: IMachine {5eaa9319-62fc-4b0a-843c-0cb1940f8a91}
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Error when deleting snapshot?

Post by mpack »

"More than one hard disk" means you have a branching snapshot structure, something like this :-

A---- First child of A (A1)
|
+---- Second child of A (A2)

You can't delete A without splitting into two independent VMs, and VBox currently can't do that.

This would have happened if at some point after creating A1 you restored (not reverted) the "A" state and then booted the VM. That would implicitly have created the 2nd child of A.
jvsrvcs
Posts: 38
Joined: 26. Oct 2011, 02:53
Primary OS: MS Windows 7
VBox Version: OSE self-compiled
Guest OSses: Android

Re: Error when deleting snapshot?

Post by jvsrvcs »

I understand that if I clone a VM and all states (snapshots), it should be completely separated from the original (no links to anything). I did not think that cloning a vm and it's snapshot would somehow be linked to another VM afterwards.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Error when deleting snapshot?

Post by Perryg »

It can if you did a linked clone.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Error when deleting snapshot?

Post by mpack »

jvsrvcs wrote:I did not think that cloning a vm and it's snapshot would somehow be linked to another VM afterwards.
I see no mention of cloning in the original post.
jvsrvcs
Posts: 38
Joined: 26. Oct 2011, 02:53
Primary OS: MS Windows 7
VBox Version: OSE self-compiled
Guest OSses: Android

Re: Error when deleting snapshot?

Post by jvsrvcs »

I want to make a clone. I want it to be independent of anything after the clone (not using the master anything). The word "linked" somehow conveys to me that it will be linked to something, but I want it to be independent, so I never do a linked clone.

I am in a situation where I want to delete a snapshot but it says I can't. It is linked to something I deleted but not sure why. I am not warned that deleting a VM and all it's files will prevent me from deleting X snapshot and confirm that I want to continue. I have a bunch of snapshots around that are really causing confusion and I want to delete them but am not allowed to by the software.
jvsrvcs
Posts: 38
Joined: 26. Oct 2011, 02:53
Primary OS: MS Windows 7
VBox Version: OSE self-compiled
Guest OSses: Android

Re: Error when deleting snapshot?

Post by jvsrvcs »

The issue of not being able to delete a snapshot seems to result in first cloning a machine (machine A to machine B), creating snapshots on machine B then at some point deleting machine A, then trying to remove a snapshot on machine B that was created. If this is the case then it is not really a 'clone' and is in every case a 'linked clone'. When I do a clone, I do a full clone with all states (I never check anything that says "linked").
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Error when deleting snapshot?

Post by mpack »

If the situation was as you described then it would be a bug, though it would be such a common bug that it's strange no one else has noticed it. To be taken seriously you would have to document a step by step method which reproduces this bug.
Post Reply