VirtualBox

Opened 14 years ago

Closed 13 years ago

#6388 closed defect (fixed)

delete snapshot deletes primary master disk

Reported by: rkit Owned by:
Component: virtual disk Version: VirtualBox 3.1.4
Keywords: delete snapshot Cc:
Guest type: Windows Host type: Windows

Description

In a szenario with differencing disks and snapshots deleting the last snapshot removes the primary master disk for the VM.
I have disks as follows:

Windows XP core disk
--- Windows XP Base disk (differencing disk with Windows XP core disk as parent)


The VM 'Windows XP Base' uses 'Windows XP Base Disk' as primary master.

Two snapshots are created:

snapshot 1
---- snapshot 2
--------current state


I then tried to delete snapshots 1 and 2 and merge their contents into 'Windows XP Base disk'. Deleting snapshot 2 (which is very small) leaves

snapshot 1
---- current state


and everything looks normal.
Deleting snapshot 1 takes longer to merge and leaves only 'current state', but disk 'Windows XP Base disk' is gone. The VM is based on a disk in the machine's snapshot directory, which has 'Windows XP Core disk' as parent.
The VM is no longer bootable, VB reports that ntoskrnl.exe cannot be found.
I didn't try it yet, but it seems that restoring the VM from a backup would need heavy editing of the XML files, because the VMs information is not only kept in the <machine>.xml, but is strongly connected to the disk / snapshot hierarchy definition in the <MediaRegistry> within the Virtualbox.xml file.

Attachments (5)

VirtualBox.xml (4.4 KB ) - added by rkit 14 years ago.
Virtualbox.xml before merge (actually, a bit older)
VirtualBox.2.xml (4.5 KB ) - added by rkit 14 years ago.
after merge
WIn XP Base 2.xml (69.6 KB ) - added by rkit 14 years ago.
VM before merge
WIn XP Base 2.2.xml (8.8 KB ) - added by rkit 14 years ago.
vm after merge
VBox.log (50.5 KB ) - added by rkit 14 years ago.
trying to boot

Download all attachments as: .zip

Change History (14)

comment:1 by Sander van Leeuwen, 14 years ago

Cc: mail@… removed

comment:2 by Sander van Leeuwen, 14 years ago

Resolution: duplicate
Status: newclosed

Sounds like a duplicate of #6023

comment:3 by Sander van Leeuwen, 14 years ago

Resolution: duplicate
Status: closedreopened

Ok, after rereading it does sound different. Please attach your configuration files and VBox.log.

comment:4 by aeichner, 14 years ago

And the VirtualBox.xml file before you started the merge operation would be helpful too, if it is still existing.

by rkit, 14 years ago

Attachment: VirtualBox.xml added

Virtualbox.xml before merge (actually, a bit older)

by rkit, 14 years ago

Attachment: VirtualBox.2.xml added

after merge

by rkit, 14 years ago

Attachment: WIn XP Base 2.xml added

VM before merge

by rkit, 14 years ago

Attachment: WIn XP Base 2.2.xml added

vm after merge

by rkit, 14 years ago

Attachment: VBox.log added

trying to boot

comment:5 by rkit, 14 years ago

Another bit of information: the 'before merge' config files have additional snapshots which I deleted in a previous session. At merge time only the snapshots labeled 'Sicherungspunkt 1' and 'Sicherungspunkt 2' have been present. As I can see from the vm file, 'Sicherungspunkt 1' is connected to the basic disk 'Win XP Base 2.vhd', so it seems only logical the the disk is removed together with the snapshot. My expectation, however, was that by deleting 'Sicherungspunkt 1' all changes beeing merged into 'Win XP Base 2.vhd', or the current state.

comment:6 by rkit, 14 years ago

by the way: the ticketing system shows me as logged in, but accepts inputs only sporadically. Most of the time I'm getting errors 403 TICKET_APPEND rights required, after 5-6 submits it finally gets accepted. Running Firefox 3.6 with cookies enabled.

comment:7 by Klaus Espenlaub, 14 years ago

You're mixing up the images before and after the snapshot. If you delete the very first snapshot, then the content of the first diff (containing the disk changes AFTER the snapshot was taken) gets merged into the base image.

If you delete other snapshots but the first one then the opposite merge direction is used. I don't think it's necessary here to explain in great detail why it's handled exactky this way. It should be working, and if it doesn't it's a bug.

comment:8 by rkit, 14 years ago

@klaus:

You're mixing up the images before and after the snapshot. If you delete the very first snapshot, then the content of the first diff (containing the disk changes AFTER the snapshot was taken) gets merged into the base image.

that's exactly what I expected VB to do, instead the base image has been deleted leaving the first snapshot, which is not bootable.

comment:9 by Frank Mehnert, 13 years ago

Resolution: fixed
Status: reopenedclosed

Please reopen if still relevant with VBox 4.0.4.

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use