S
S
somename2020-12-29 08:11:11
virtual box
somename, 2020-12-29 08:11:11

How to prevent depletion of free disk space in VirtualBox?

It costs Ubuntu on VirtualBox, everything is in order, everything works. But despite the fact that I don’t install anything special, I don’t download, etc. disk space is doing something:

5feab7d158fb8174520113.jpeg

That is, initially it was less than 10 GB occupied, and now it is approaching 15. Last time, when the occupied space exceeded the allotted size, Ubuntu simply stopped turning on:

5feab92578856317598619.jpeg

I could not fix this then, I had to create a new one. I really do not want this to happen again, so please advise what to do. (maybe it's certainly not at all in the memory on the disk, but any advice in general will be useful).

Answer the question

In order to leave comments, you need to log in

4 answer(s)
Z
Zzzz9, 2020-12-29
@Zzzz9

I suggest making a snapshot or a copy of the disk, after that:
sudo apt clean
sudo apt autoremove
show what happens in size.

D
d-stream, 2020-12-29
@d-stream

Most likely, a kind of "journal mode" works in dynamic disk mode - changes are not written directly to the main file, but a kind of diff. It is worth doing a "shutdown" through the virtualbox integration tools - upon completion, the log will merge and the size will decrease.

R
rrambo, 2020-12-29
@rrambo

Maybe switch to another Linux? costs antiX in vbox, does not eat the place (I took a ready-made VM). the plus is that 768 MB of RAM memory is allocated and enough, and the OS is without garbage (so far, systemd ..)

A
acwartz, 2020-12-29
@acwartz

The peculiarity of a dynamic image is that it does not decrease in size depending on the actual use.
You boot into the virtual machine, from there to the Linux terminal and delete the void (for visible through the sDelete utility from SysInternals with the -z parameter for the volume that is the connected vdi disk):


telinit 1
mount -o remount,ro /dev/sda1
zerofree -v /dev/sda1

turn off the virtual machine, and compress the file:

vboxmanage modifymedium --compact /path/to/thedisk.vdi

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question