Is there a way to exclude a specific drive vdi from "snapshots" in VirtualBox?

Posted by Graza on Super User See other posts from Super User or by Graza
Published on 2010-05-08T22:02:02Z Indexed on 2010/05/08 22:08 UTC
Read the original article Hit count: 270

Filed under:
|
|
|

...or is there another space-efficient way of dealing with the page/swap file of the Guest O/S?

I've realised that its quite possible/likely that one of the things which "bloats" the snapshot/diff vdi's when a snapshot is taken is the guest operating system's pagefile.

For example, say I have a 2Gb swap-file in a Windows guest OS, and over the course of a few weeks the usage of the swap file has gone over 1Gb a couple of times.

When I next create a snapshot, it seems likely that I'd be almost guaranteed around 1Gb of space taken up in the new differencing disk just because of changes in the swap file. Obviously (provided I never did "live" snapshots on running or paused machines, and only ever did them when the machine was shut down), I would not need any of the information in the swap file to be saved. So this would simply be a waste of 1Gb.

I'm wondering if there's a way to attach a vdi to a VM and flag it as "exclude from snapshots" - which would mean I could put the swap file on a different vdi which would never be included in a snapshot.

Or if anyone has any other suggestions. Or an explanation about why it might not be an issue.

I could obviously delete and recreate a swap drive vdi every time I did a snapshot to achieve the same effect, but this is a little more effort than simply clicking "create snapshot"....

© Super User or respective owner

Related posts about virtualbox

Related posts about virtualization