Page 1 of 1
snapshot: grows by "VBoxManage modifyhd xy.vdi --compact"
Posted: 8. Jun 2010, 10:15
by tagore
I use an immutable image plus persistant snapshot (--autoreset off)
After some time the size this persistent snapshot keeps increasing over the size of the immutable masterimage
as well as over the Diskusage shown in the guest. And what is worse: It even grows with "VBoxManage modifyhd xy.vdi compact"
The state of the guest should only differ by the installation of 3 or 4 small applications. No Updates. User Data are removed or on the network.
Any help ?
- Immutable image: 4,8GB
- Disk Usage shown by guest: (total: 10 GB, used: 4 GB, free 6 GB
- Snapshot
before compact: 5.87 GB
after compact: 6.28 GB
Virtualbox 3.1.2 r56127
Host: Knoppix /Debian Lenny, networkboot
Guest WinXP SP3
Thanks
Re: snapshot: grows by "VBoxManage hdmodify xy.vdi compact"
Posted: 8. Jun 2010, 10:21
by baf
What is the max allowed size of the base vdi?
I wonder because a guest os may have an allocation strategy where it avoids overwriting previous data. So every time disk is used it tries to use previously unused disk area.
If you want to make it smaller try using
SDelete before doing compact this zeroes out unused space.
Re: snapshot: grows by "VBoxManage modifyhd xy.vdi --compact"
Posted: 8. Jun 2010, 15:10
by tagore
Thanks for your reply, baf. Max size of the base vdi is 10 GB.
I tried SDelete -z before "VBoxManage modifyhd xy.vdi --compact" without success.
Having moved base- and differential from NFS to local ext3 would not make a difference either.
Differential disk has grown to 8.4 GB now.
Re: snapshot: grows by "VBoxManage modifyhd xy.vdi --compact"
Posted: 8. Jun 2010, 15:14
by Leak
tagore wrote:I tried SDelete -z before "VBoxManage modifyhd xy.vdi --compact" without success.
Just checking here - you did run SDelete inside the guest and not on the host, right?
Re: snapshot: grows by "VBoxManage modifyhd xy.vdi --compact"
Posted: 8. Jun 2010, 15:27
by tagore
yes: SDelete on the WInXP-Guest. Then shutdown the Guest and run VBoxManage on the Debian-Host.
[SOLVED] Re: snapshot: grows by "VBoxManage ... --compact"
Posted: 9. Jun 2010, 14:57
by tagore
It was helpful to defrag NTFS before using VBoxMangage modifyhd xy.vdi compact.
( see also
http://forums.virtualbox.org/viewtopic.php?f=1&t=8046)
Re: snapshot: grows by "VBoxManage modifyhd xy.vdi --compact"
Posted: 22. Nov 2010, 21:10
by bobpaul
As of
May 2007 compact was known not to work on disks with snapshots. I haven't seen anything to indicate this has changed.
Re: snapshot: grows by "VBoxManage modifyhd xy.vdi --compact"
Posted: 24. Nov 2010, 13:17
by mpack
bobpaul wrote:As of
May 2007 compact was known not to work on disks with snapshots. I haven't seen anything to indicate this has changed.
I would expect it to work in a technical sense of not crashing - but it wouldn't be very effective since I expect it only discards zero blocks from the current state.