[Solved] Reduce the size of the .vdi file
-
- Posts: 43
- Joined: 28. Nov 2014, 22:11
[Solved] Reduce the size of the .vdi file
I installed Ubuntu 18.04 on VirtualBox by assigning dynamic space to the HD 2TB. Working with large files, the .vdi has grown a lot. Are there any methods to permanently remove deleted files?
Thank you
Thank you
Last edited by socratis on 29. Jun 2018, 17:23, edited 1 time in total.
Reason: Marked as [Solved].
Reason: Marked as [Solved].
-
- Site Moderator
- Posts: 27329
- 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: Reduce the size of the .vdi file
User Manual, ch. 8.23 VBoxManage modifymedium, look for the "--compact" option. Also in the User Manual that gets installed with VirtualBox, in PDF format, that you can search.
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.
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.
-
- Posts: 43
- Joined: 28. Nov 2014, 22:11
Re: Reduce the size of the .vdi file
Thanks so much. I understood your intervention and documentation. But I do not understand the technical question. Where should I write the string "[--compact]"? In which file should I add the string "VBoxManage modifymedium [--compact]"?
-
- Site Moderator
- Posts: 39134
- Joined: 4. Sep 2008, 17:09
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Mostly XP
Re: Reduce the size of the .vdi file
I suggest that you forget VBoxManage, as that "--compact" option will do nothing by itself. Instead download CloneVDI and run it under Wine on your Linux host. Tick the "compact" option before cloning. See the release notes for details.
-
- Posts: 43
- Joined: 28. Nov 2014, 22:11
Re: Reduce the size of the .vdi file
I solved with this code:
With the second system you write I would have spent less time?
Code: Select all
sudo apt install zerofree
df
zerofree -v /dev/sda1
halt
cd "C:\Program Files\Oracle\VirtualBox"
VBoxManage.exe modifymedium "F:\...\UBUNTU 18.04 LTS.vdi" --compact
-
- Site Moderator
- Posts: 39134
- Joined: 4. Sep 2008, 17:09
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Mostly XP
Re: Reduce the size of the .vdi file
Much less time, yes. Like, you would have been finished in a few minutes instead of however long it took you to run zerofree.
-
- Posts: 43
- Joined: 28. Nov 2014, 22:11
Re: [Solved] Reduce the size of the .vdi file
Where can I find the software for Ubuntu 18.04?
Thank you
Thank you
-
- Site Moderator
- Posts: 39134
- Joined: 4. Sep 2008, 17:09
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Mostly XP
Re: [Solved] Reduce the size of the .vdi file
I assume you mean CloneVDI. CloneVDI is a Windows (Win32) app, it is not available as a native Linux app. However you can run it on Linux under Wine, and I'm told it runs well that way.giannino1995 wrote:Where can I find the software for Ubuntu 18.04?
I deleted your crosspost of this question.
-
- Posts: 43
- Joined: 28. Nov 2014, 22:11
Re: [Solved] Reduce the size of the .vdi file
I'm exhausted. I'm happy with ZeroFree.
thank you
thank you