VirtualBox

Ticket #6388 (closed defect: fixed)

Opened 4 years ago

Last modified 3 years ago

delete snapshot deletes primary master disk

Reported by: rkit Owned by:
Priority: major 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

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

Change History

comment:1 Changed 4 years ago by sandervl73

  • Cc mail@… removed

comment:2 Changed 4 years ago by sandervl73

  • Status changed from new to closed
  • Resolution set to duplicate

Sounds like a duplicate of #6023

comment:3 Changed 4 years ago by sandervl73

  • Status changed from closed to reopened
  • Resolution duplicate deleted

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

comment:4 Changed 4 years ago by aeichner

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

Changed 4 years ago by rkit

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

Changed 4 years ago by rkit

after merge

Changed 4 years ago by rkit

VM before merge

Changed 4 years ago by rkit

vm after merge

Changed 4 years ago by rkit

trying to boot

comment:5 Changed 4 years ago by rkit

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 Changed 4 years ago by rkit

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 Changed 4 years ago by 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.

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 Changed 4 years ago by rkit

@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 Changed 3 years ago by frank

  • Status changed from reopened to closed
  • Resolution set to fixed

Please reopen if still relevant with VBox 4.0.4.

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use