Origin and purpose of ".sav" files inside Snapshots folder

Discussions about using Windows guests in VirtualBox.
Ranguno
Posts: 29
Joined: 28. Apr 2013, 14:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows Xp Home

Origin and purpose of ".sav" files inside Snapshots folder

Post by Ranguno »

sav-files.PNG
sav-files.PNG (27.39 KiB) Viewed 9779 times
Host: Windows 10 Pro 64 bit
Guest: Windows Xp Home SP3 32 bit
VirtualBox: 6.0.4

Hello,

today I found a ton of ".sav" files, all heavyweights, I wonder about their existence, they didn't introduce, just there.

My questions are:

(1) What is their origin?
(2) What is their purpose?
(3) Can I remove them?
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Origin and purpose of ".sav" files inside Snapshots folder

Post by socratis »

  1. Getting a live snapshot, that's the hardware state plus the contents of the RAM at the time you took the snapshot.
  2. To restore the VM to a previous state.
  3. It depends on how many snapshots you have, and if they're referenced. If they are, a definitive NO, you're going to break all your snapshots.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Ranguno
Posts: 29
Joined: 28. Apr 2013, 14:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows Xp Home

Re: Origin and purpose of ".sav" files inside Snapshots folder

Post by Ranguno »

@socratis: This is strange, the VM has no snapshots. Maybe I created some in 2013, can't remember, but for sure not in 2018 and 2019. So I think I can remove the files, right?
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Origin and purpose of ".sav" files inside Snapshots folder

Post by mpack »

You have not provided the evidence needed to give any such assurance. I see a lot of 2019 dates in there, so these files are not historical value only.

And to answer your question: a SAV file is mostly a RAM dump. It's created when you suspend a VM, but it's normally deleted when you restart the VM. Either you are creating live snapshots as Socratis mentions, or something really nasty is going on, like the files in that folder being protected somehow.
Ranguno
Posts: 29
Joined: 28. Apr 2013, 14:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows Xp Home

Re: Origin and purpose of ".sav" files inside Snapshots folder

Post by Ranguno »

@mpack:

I bet nasty, since I definitively did no snapshots in 2018 and 2019, and the ".sav" files (none is readonly) are the sole content of the Snapshots folder.

Do you mean "pause" by "suspend"?

My VirtualBox updates:
2018-12-22 to 6.0.0
2019-03-01 to 6.0.4

Most of the dumps have been created during VB 6.0.0 and no one since VB 6.0.4. Therefore I will observe the scene for a while and then try to remove the ".sav" litter. To clone the VM may also be a way to get rid of the savs.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Origin and purpose of ".sav" files inside Snapshots folder

Post by mpack »

Ranguno wrote: Do you mean "pause" by "suspend"?
No, I meant what I said, though I imagine both features work in a similar way.

This should be a very easy experiment. Pause and resume your VM and see if a new .sav file is created, and persists after the VM is shut down and restarted. If that happens then we can file a BugTracker ticket.

Are you perhaps doing something weird with "pause"? For example pausing the VM and then shutting down the host?
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Origin and purpose of ".sav" files inside Snapshots folder

Post by socratis »

Besides what mpack asked for, I would also like to see the "recipe" of the VM, the ".vbox" file:
  1. Right-click on the VM in the VirtualBox Manager. Select "Show in Finder/Explorer/Whatever".
  2. ZIP the selected ".vbox" file and attach it to your response.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Ranguno
Posts: 29
Joined: 28. Apr 2013, 14:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows Xp Home

Re: Origin and purpose of ".sav" files inside Snapshots folder

Post by Ranguno »

@mpack: I didn't find "suspend", neither in the manual nor as a menu item. So I think you mean a Windows Xp system command to send the guest into hibernation. But no, I don't do this. Similar with "pause", very rarely used, never before shutting down the host and never with a noticeable problem. I passed your pause procedure, no extra sav has been created.

@socratis:

Besides the ".vbox" file I also zipped "VBox.log" since the VM shows an unusual start behaviour:

from sec 0 till sec 24: normal
from sec 24 till sec 56: blue "Welcome" screen
from sec 56 till sec 109: empty desktop
afterwards: normal
Attachments
VBox.zip
(24.27 KiB) Downloaded 27 times
WinXp Home 32 Bit SP3.zip
(3.06 KiB) Downloaded 24 times
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Origin and purpose of ".sav" files inside Snapshots folder

Post by mpack »

Ranguno wrote:So I think you mean a Windows Xp system command to send the guest into hibernation.
No, I'm referring to the use of the "Save the machine state" option that appears on the "Close Virtual Machine" dialog that appears when you hit the close button on a VM window. "Suspending a VM" is exactly what this option does, though I have no idea if the user manual includes those words.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Origin and purpose of ".sav" files inside Snapshots folder

Post by mpack »

You seem to have a weird folder arrangment for this VM, very non standard, though I don't see how that could cause your problem. I don't see any configuration errors in the log.

If you are not pausing the VM deliberately, then my next guess is that the VM is being paused when the host goes into some kind of power management mode. Again, it would be a bug if the sav file was to persist after the VM is resumed.
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Origin and purpose of ".sav" files inside Snapshots folder

Post by socratis »

<ExtraDataItem name="GUI/LastCloseAction" value="SaveState"/>
What mpack is referring to is ch. 1.9.6 Saving the State of the Machine. And from that chapter, here's the picture that goes along the description:
Image

According to your .VBOX file, this is default action when you're closing the VM window; "Save the machine state". That will create a timestamped .SAV file, that is the correct behavior.

Now, when you restart the VM, this .SAV file is supposed to be gone. But for some weird reason it's not in your case. Not sure what's going on, or how you accomplished that, by which exact procedure you got yourself into that situation.

Since there's no snapshot (live or not) of the VM, you can safely delete all of these. Some go as back as 2013 actually!

I would delete them all and start monitoring the directory for those SAV files. If you notice a pattern of specific actions leading to a SAV file being forgotten in a reproducible way, please mark the steps needed to reproduce and post a new post.
Ranguno wrote:Besides the ".vbox" file I also zipped "VBox.log" since the VM shows an unusual start behaviour:
The weird behavior refers to the timing?
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Origin and purpose of ".sav" files inside Snapshots folder

Post by mpack »

Since the VM uses non-standard folder arrangements I'm wondering if there might be a missing part to this story, such as VMs cross referencing each other's folders, more than one VM in a folder, etc.
Ranguno
Posts: 29
Joined: 28. Apr 2013, 14:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows Xp Home

Re: Origin and purpose of ".sav" files inside Snapshots folder

Post by Ranguno »

I'm saving the VM as rarely as I pause it, but I will look into the Snapshots folder, when I do it again.

The VM has two disks, one on SSD, one on a standard disk, therefore the special folder setting.

You're right, socratis, I could kick the savs out of the Snapshots folder, I'm glad to see them die. However, the start delaying persists.

@mpack @socratis: Thanks for your advice!
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Origin and purpose of ".sav" files inside Snapshots folder

Post by mpack »

Ranguno wrote: The VM has two disks, one on SSD, one on a standard disk, therefore the special folder setting.
That doesn't completely explain the odd folder structure. A VM "VMname" normally resides in a folder "<userdoc>\VirtualBox VMs\<VMname>". Inside that folder you find the .vbox file, one or more VDI files, and the Logs and Snapshots subfolders. If a VM has a second drive it's usually in the same folder as the main drive VDI.

If you had a second large drive then I can understand that being located outside the VM folder, but it appears that both your VDIs are relocated to custom subfolders, also the containing folder does not have the expected name either, i.e. "WinXP" instead of "WinXp Home 32 Bit SP3". I can't tell from the log if the VDI subfolders are in the VM folder.

It's obvious that some kind of manipulation of the folder structure (moving files, cross linking of files) has been going on, which I'm trying to fathom.
xLoris
Posts: 1
Joined: 7. Sep 2021, 10:20

Re: Origin and purpose of ".sav" files inside Snapshots folder

Post by xLoris »

mpack wrote:Since the VM uses non-standard folder arrangements I'm wondering if there might be a missing part to this story, such as VMs cross referencing each other's folders, more than one VM in a folder, etc.
I have the same problem and similar folder structure, running a Windows7 VM in VirtrualBox 5.2 on a Win7 host machine. I have:

1) VDI machine in C:\VGEOING
2) I have not taken any snapshots in 2021 ( empty Snapshots folder in C:\Users\[username]\VirtualBox VMs\IT-GeoIng
3) 8 automatically generated .sav files in C:\VGEOING\IT-GEOING_VDI\Snapshots , which are the following:
22/11/2019 04:15 512.935.244 2019-11-22T02-15-11-969160600Z.sav
04/04/2020 03:15 830.500.638 2020-04-04T01-15-25-458211300Z.sav
14/08/2020 03:15 765.512.389 2020-08-14T01-15-31-322035500Z.sav
10/12/2020 15:20 407.058.121 2020-12-10T13-20-23-981099600Z.sav
17/02/2021 04:15 887.214.398 2021-02-17T02-15-14-792906300Z.sav
05/03/2021 04:15 728.812.967 2021-03-05T02-15-15-467560100Z.sav
06/06/2021 03:15 747.508.014 2021-06-06T01-15-17-974998300Z.sav
24/06/2021 19:32 906.621.007 2021-06-24T17-32-08-329953200Z.sav

My guess is that these .sav files are created during normal VM activity and are not deleted because of sudden power failures on the hosting machine ... which happened quite often in 2021.

And I confirm that deleting those .sav files has no effect on the VM fuctionality.

bye,
Loris
Last edited by xLoris on 7. Sep 2021, 15:16, edited 1 time in total.
Locked