VirtualBox

Opened 6 years ago

Last modified 6 years ago

#17401 new defect

Snapshot saved state discarding

Reported by: GnomeUser Owned by:
Component: GUI Version: VirtualBox 5.2.2
Keywords: Cc:
Guest type: all Host type: Windows

Description

Can't find an option to discard a snapshot saved state. I.e. discard its running instance saved memory leaving the drive snapshot. If you made a snapshot of a running machine then its memory is saved forever too. This ram state is probably responsible for the most of its snapshot size.

Change History (6)

in reply to:  description ; comment:1 by Socratis, 6 years ago

Replying to GnomeUser:

Can't find an option to discard a snapshot saved state. I.e. discard its running instance saved memory leaving the drive snapshot.

If you're talking about the .SAV file that's left behind, then it's a +1 from me. If not, then please explain with filenames and examples of saved states / snapshots.

This ram state is probably responsible for the most of its snapshot size.

I'm afraid that's not your problem. A "live" snapshot will record the changes in the virtual hard drive in a differential snapshot VDI, plus the contents of the memory in a .SAV file. That .SAV file can be as big as your RAM, but the changes in the hard drive can be substantially larger! Again, if you don't use specific examples, we can't know what you're referring to...

in reply to:  1 comment:2 by GnomeUser, 6 years ago

Replying to socratis:

If you're talking about the .SAV file that's left behind, then it's a +1 from me.

Yes.

That .SAV file can be as big as your RAM, but the changes in the hard drive can be substantially larger!

If I do consequent snapshots before and after installing a small app, the difference in .vdi saved in snapshot will be tiny while .sav is always as big as memory and it can easily be few gigs in size.

But anyway... there should be an option to remove memory image associated with snapshot

comment:3 by Valery Ushakov, 6 years ago

Discarding snapshot's *.sav file, i.e. VM's memory, is like yanking a power cord from a working machine. Why would you want to do that? After you have installed your app, some of the new file system data may still be in OS memory, and if you discard that, you get corrupt file system and even your app binary may be missing.

in reply to:  3 comment:4 by GnomeUser, 6 years ago

Replying to vushakov:

is like yanking a power cord from a working machine

Yep.

Why would you want to do that

Because I don't need its memory state anymore.

system data may still be in OS memory

So? There is "power off machine" option and "discard" button on toolbar as well. If you are allowed to do so to a working machine and with a current working state why don't you allowed to do this with snapshots?

comment:5 by Klaus Espenlaub, 6 years ago

Enough people pointed out that it's not safe...

I think this would be implementable using the current API. Today it's not possible (because the "discard" operation is only allowed for "current state"). This needs probably less than 10 lines of code (and the same amount on the client side, for the core functionality), the main effort is testing, i.e. making sure it actually works and doesn't introduce bugs or corrupt VMs.

comment:6 by Socratis, 6 years ago

Klaus, allow me to disagree. I honestly doubt that deleting the .SAV files will corrupt the VM. Some file contents, maybe. It's just like yanking the power of a desktop w/o UPS. Mostly not a big deal, unless you were in the middle of a write operation (and w/o a journaled filesystem). Add a big warning? Sure. But not have it at all as an option?

Plus if you delete a previous snapshot that included a SAV, what good would a stand-alone SAV file do? It's of no use anymore in any event...

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use