Snapshot size discrepancy

Discussions about using Windows guests in VirtualBox.
Post Reply
Davin
Posts: 20
Joined: 3. Jul 2015, 00:19

Snapshot size discrepancy

Post by Davin »

This may be a noob question, but I'm seeing a file size strangeness with snapshot files. I hope someone can help me figure out what I'm doing wrong.

I've recently started running VB 4.3.12 under my Win 8.1 host. I've created a VM and loaded a Win XP client on it and gotten it patched up to date. My VDI file is defined as 15GB (variable) and is physically taking 8.6Gb on the host disk. All fine so far. But now I want to take a snapshot to reduce the part of the host file that's changing. So I power down the VM and create a snapshot file and reboot the VM (and do nothing else to it). The Virtual Media Manager tells me that the new snapshot file is taking up 2Mb on disk, which seems quite reasonable for something that hasn't really changed. But if I go to my host drive and look at the actual file, it's actually taking up 418Mb on the host disk! (I thought maybe it was a sparse file, but it's not marked as such.)

So I have two questions:

1) Why is the snapshot file so huge when it should be completely empty?

2) Why does the VMM show it as being only 2Mb in size when the host OS disagrees by two orders of magnitude?

(I'm trying to back up only the snapshot files every day and this is too large to manage.)

Anyone got any thoughts? :?

Davin
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Snapshot size discrepancy

Post by mpack »

Booting the VM will have made a lot of changes to the disk. Watch the drive light on a physical Windows PC sometime - the writes are continuous.

I won't comment on what you saw in media manager. I'll only say that I've not noticed that discrepency.

I hope you did a search for "snapshot problems site:forums.virtualbox.org" before embarking on this? Make sure you understand the need to backup often: snapshots are not backups, nor do they make the VM safer, or make the VM use less disk space. I really don't understand why newbies always make a beeline for the feature!
Davin
Posts: 20
Joined: 3. Jul 2015, 00:19

Re: Snapshot size discrepancy

Post by Davin »

Thanks - I expected the drive to have a number of changes, but half-a-gig's worth seemed excessive.

It sounds like maybe someone needs to check into the VMM size reporting, too, if this has been seen before and it's not just me.

I did try to do a number of searches before posting here, but there were a whole lot of search-matches that didn't fit my situation and nothing that I found (in a few hours of reading) that did, so I figured I'd harness the global knowledge base to help. I do appreciate the feedback.

FYI - I wasn't trying to do anything that you mentioned as typical noob behavior. My idea was to back up the whole VM disk once and thereafter only backup the differences file (which in this case should have been "minimal" because it was planned to be a read-mostly disk). But I wasn't trying to use snapshots to replace backups or make it safer or reduce disk usage ... just reduce daily backup space & time.

Since things didn't work out like I'd planned (and you say that could be reasonably expected), I'm going for an alternate plan that's more complicated to implement but I think will be better in the long run.

Thanks again for your comments!
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Snapshot size discrepancy

Post by mpack »

I am quite certain that there is no bug in this area. You are talking about THE most proven feature in the software, so unless you can demonstrate a reproducable and obvious fault then I doubt this will get anyone's attention. Your intuition really has no play here.
Davin
Posts: 20
Joined: 3. Jul 2015, 00:19

Re: Snapshot size discrepancy

Post by Davin »

mpack wrote:I am quite certain that there is no bug in this area. You are talking about THE most proven feature in the software, so unless you can demonstrate a reproducable and obvious fault then I doubt this will get anyone's attention. Your intuition really has no play here.
I'm talking about the VMM reporting 20Mb when the OS reports 418Mb. I'm quite willing to concede that if it really takes that much on disk then it must be right, but the VMM should at least tell me the right number.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Snapshot size discrepancy

Post by mpack »

Come up with a repeatable way to reproduce the problem, and describe it on a BugTracker ticket. That's all you can do. Of course you'll also need to show that there is a problem, without relying on intuition. Some provable error, particularly if it deviates from what the manual says should happen.

Frankly, I doubt that there can be any problem other than maybe a lag in updating the informational stats in one dialog. Perhaps because the VM was still running at the time?
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Snapshot size discrepancy

Post by mpack »

Incidentally, one clarification. When I say that this is the most proven feature in the software, I'm referring to the storing of data in VDI containers. That feature is virtually unchanged since 2007. I'm not talking about snapshots. There are many issues with snapshots, but nothing relevant to this discussion.
Post Reply