A
A
Anton Kiselyov2016-12-28 15:55:58
virtual box
Anton Kiselyov, 2016-12-28 15:55:58

What is the correct way to delete snapshots in VirtualBox to minimize the size?

Put Windows XP on Oracle VirtualBox for experiments with a car scanner. The system with the necessary software occupies 1.5 Gb (the Windows XP distribution kit is severely curtailed and without any hybernate.sys and pagefile.sys)
In the process of experiments (only related to software settings, without additional installation of anything), I spawned 7 snapshots in two branches. Now I want to remove unnecessary snapshots, leaving one last snapshot in one branch.
Before deleting, I made a full clone of the entire turned off virtual machine, just in case.
In the clone, I deleted all the pictures except the one I needed, the output size is 10 GB. What did I do wrong, and what should be the correct order to delete snapshots so that the size returns to the original 1.5 GB or very close to it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Konstantin Tsvetkov, 2016-12-28
@zamboga

What is the correct way to delete snapshots in VirtualBox to minimize the size?
System snapshots when deleted (merged) only increase the size of the virtual disk if it is resizable. To compress a virtual disk, and this is the envy of its type, you can run the command:
Might not help.
For virtual disks, it is advised to clean up unallocated space:
@Echo OFF
Echo %COMPUTERNAME%: %DATE% %TIME% Clean free space > run.log
sdelete.exe -C С:
Echo %DATE% %TIME% Zero free space >> run.log
sdelete.exe -Z С:
Echo %DATE% %TIME% End>> run.log

In the machine itself using the SDelete program (version 1.6.1)
Anton Efremov @zamboga
Everything is ok, thanks, I compressed the image. A couple of remarks.
1. You have an error in the sdelete syntax. The -c key does not exist, there is the -s key.

There is no error:
SDelete - Secure Delete v1.61
Copyright (C) 1999-2012 Mark Russinovich
Sysinternals - www.sysinternals.com

usage: C:\Program Files\SDelete\sdelete.exe [-p passes] [-s] [-q] <file or directory> ...
       C:\Program Files\SDelete\sdelete.exe [-p passes] [-z|-c] [drive letter] ...
   -a         Remove Read-Only attribute
   -c         Clean free space
   -p passes  Specifies number of overwrite passes (default is 1)
   -q         Don't print errors (Quiet)
   -s or -r   Recurse subdirectories
   -z         Zero free space (good for virtual disk optimization)

If we process the entire disk, then [-z|-c] means or . And your command will not clean up the space occupied by deleted folders.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question