VirtualBox

Ticket #6097 (closed defect: fixed)

Opened 4 years ago

Last modified 3 years ago

"Current state" is changed right after taking snapshot

Reported by: Winchester Owned by: umoeller
Priority: major Component: virtual disk
Version: VirtualBox 3.1.2 Keywords: current state changed
Cc: Guest type: Windows
Host type: Linux

Description

"Current state" is changed right after taking snapshot

Scenario to reproduce the problem:
1) Power on a virtual machine and boot an OS in it.
2) Shutdown the machine cleanly.
3) Take snapshot of "Current State" and name it, for example as "Snapshot 1".
Problem: you will get the result as follows:
Snapshot 1 (1 second ago)

Current State (changed)

It incorrect that "Current state" is changed right after the snapshot is taken when the machine is turned off. I use VirtualBox 3.1.2, host OS is Linux Ubuntu 9.04, Guest OS is Windows XP SP3. Virtual disk image file format is VDI.
I also could reproduce the problem on another 2 PCs with host OSs Windows Vista SP2 and Linux Mandriva 2010 and different guest OSs. So it seems it does not matter which host and guest OSs are.
The problem did not exist on VirtualBox 3.0.12. In that version "Current state" remains identical to the state saved in snapshot until the machine is powered on again.
I am not sure but probably this is the reason of virtual disk corruption described in #6023 (with more steps like taking another snapshot and removing a previous one). I could also reproduce the problem from #6023 on my systems.

Attachments

VBox.log.1 Download (58.8 KB) - added by Winchester 4 years ago.

Change History

Changed 4 years ago by Winchester

comment:1 Changed 4 years ago by umoeller

  • Owner set to umoeller
  • Status changed from new to assigned

comment:2 Changed 4 years ago by Raf_Schietekat

Confirmed for VirtualBox 3.1.8 on Ubuntu 10.04. I suspect it does not matter whether the client system was shut down inside or just its state saved. Here's another way to consistently reproduce this: "Power off the machine" with "Restore current snapshot 'NameOfSnapshot'", "Snapshots" shows "Current State", select it and "Take Snapshot of Virtual Machine", "Snapshots" now shows "Current State (changed)". At first sight the logs are only about the sessions and don't include information about taking a snapshot at such time.

After some research, my assumption is an incorrect use of "SaveS_ResetCurStateModified" from inside Vbox/Main/SnapshotImpl.cpp, but this seems to have been corrected in revision/changeset 27644, on "2010-03-23 17:07:49 (2 months ago)", which may be after 3.1.8, without updating this bug report? I propose that somebody with 2 test machines tests 3.1.8 and 3.2.0 next to each other to verify, and then marks this as fixed.

comment:3 Changed 4 years ago by aeichner

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

I can verify that this was fixed. With 3.1.8 "Current state" has "changed" appended right after the snapshot was taken. This was fixed with 3.2.0. Thanks for the report!

comment:4 Changed 3 years ago by matthew72

maybe it's not a big issue but... fixed? it's still so in 4.0.4! but then, even #6023 is "fixed"...

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use