CompactVD - reduce size of dynamic disk images

Third Party Applications related to VirtualBox. This forum is moderated.
Post Reply
Rui Baptista
Posts: 60
Joined: 23. Dec 2010, 05:03
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux, ...

CompactVD - reduce size of dynamic disk images

Post by Rui Baptista »

https://github.com/eternalbits/compactVD

CompactVD is a utility to optimize the size of dynamic disk images, based on the bitmap allocation tables of known file systems.

Supported file systems:
* Hierarchical File System (HFS), used in masOS computers
* Extended File System (EXT), used in most linux desktops

Last release has a simple implementation of Logical Volume Manager to reach file systems inside linear Logical Volumes with one Physical Volume. Although not interesting from a LVM point of view, many Linux servers start with a configuration like that.
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: CompactVD - reduce size of dynamic disk images

Post by socratis »

So, from reading the description at the GitHub, I get the idea that it sorts of combines the "zerofree"/"sdelete" with the "--compact" built-in option of VBoxManage, for EXT/HFS filesystems. Would that be my correct understanding?
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.
Rui Baptista
Posts: 60
Joined: 23. Dec 2010, 05:03
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux, ...

Re: CompactVD - reduce size of dynamic disk images

Post by Rui Baptista »

Yes, the result is analogous. Of course, zeros aren't actually written and I don't know what compact does internally... but that's it.
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: CompactVD - reduce size of dynamic disk images

Post by socratis »

OK, I'll give it a shot.

On a backup. It's a first release after all... ;)
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: CompactVD - reduce size of dynamic disk images

Post by mpack »

Interesting. Of course CloneVDI has had this exact compaction feature for 7 years - is there any source code in common? (translated from C to Java) ?

Though this does fill some interesting gaps: CloneVDI does support compaction of EXTx, but not HFS. And CloneVDI doesn't support LVM. In place editing is disallowed in CloneVDI as a matter of policy as it has obvious data safety implications.
Rui Baptista
Posts: 60
Joined: 23. Dec 2010, 05:03
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux, ...

Re: CompactVD - reduce size of dynamic disk images

Post by Rui Baptista »

Hi, mpack, thank you for your interest.

This thing has evolved from a personal need for a HFS solution (as most of the open source), and therefore has no common parts with CloneVDI.

About editing in place, it is a convenient solution for less experienced users. For the conscientious ones there is a copy option :)
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: CompactVD - reduce size of dynamic disk images

Post by mpack »

Rui Baptista wrote:About editing in place, it is a convenient solution for less experienced users. For the conscientious ones there is a copy option :)
Well, of course it's precisely the less experienced users who will not understand the wisdom of making a backup copy.

VBoxManage also does e.g. resizing in place. I had these same comments back then, but I was a lone voice. And, just as I suspected, there have been several disasters where inexperienced uses have destroyed their virtual drives because of a host glitch that happened while resizing, or who simply got the resize command arguments wrong. Of course compaction shouldn't have the room for user error that resizing does.
Rui Baptista
Posts: 60
Joined: 23. Dec 2010, 05:03
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux, ...

Re: CompactVD - reduce size of dynamic disk images

Post by Rui Baptista »

https://github.com/eternalbits/compactV ... ster/share

Supported file systems:
* New Technology File System (NTFS), for Windows computers
* Extended File System (EXT), used in most linux desktops
* Hierarchical File System (HFS only), for macOS
Rui Baptista
Posts: 60
Joined: 23. Dec 2010, 05:03
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux, ...

Re: CompactVD - reduce size of dynamic disk images

Post by Rui Baptista »

https://github.com/eternalbits/compactV ... /compactVD

The app has translations in
* Chinese
* English
* French
* German
* Italian
* Japanese
* Portuguese
* Russian
* Spanish
* Turkish

Apart from French and Portuguese, the rest of the translations are based on Google Translate
Rui Baptista
Posts: 60
Joined: 23. Dec 2010, 05:03
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux, ...

Re: CompactVD - reduce size of dynamic disk images

Post by Rui Baptista »

https://github.com/eternalbits/compactV ... s/tag/v2.6

Added support for APFS (Apple File System)

Writes are only done in copy-on-write: file copies are made only when changes need to be written. Overhead can quickly reach 40% as all changes are rewritten.

Special care must be taken when copying a file, in which case the .nvram must also be copied.
Rui Baptista
Posts: 60
Joined: 23. Dec 2010, 05:03
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux, ...

Re: CompactVD - reduce size of dynamic disk images

Post by Rui Baptista »

https://github.com/eternalbits/compactVD/releases

· Try to copy the .nvram from the original file
· Uses one of two methods (FileDialog vs JFileChooser) in the open dialog
· In JFileChooser, when it finds an error, it immediately gives a message
· Change of setupToolBar from pack() to validate()
· Linux: Lvm is handled both in "Linux Lvm" and in "Linux data"
· FileDialog: brings the directory in addition to the file (2.6 regression)
· What a gross mistake in VHD. The blockTable must be different from -1!
· VHD include extra bitmap blocks with length 4096 in addition to 512
· Command line interface changed from 1.5 to 1.6
· In rare cases getImageBlockSize is less than 4096 bytes
· Treats pre-allocated full-size name as being "raw"
· HFS also reads the HFSX format in addition to the HFS+
Post Reply