I have a vm running in linux VB 4.3 and the amount of data on the vm disk reached 44Gb, I deleted loads of stuff in the vm and now webmin shows the disk space used to be about 7Gb which is correct. However when i did an export of the vm the ovf file created was 44Gb in size and the backup took ages.
I take it VB will keep increasing the disk size up to the set limit but when stuff is deleted it will not reduce the disk size back down again. Is this correct? is there a way to configure VB to automatically increase and reduce the disk size as the vm OS needs?
ps: my vm's run on a server, they are all headless and work on command line only.
vb disk size
-
- Site Moderator
- Posts: 34369
- Joined: 6. Sep 2008, 22:55
- Primary OS: Linux other
- VBox Version: OSE self-compiled
- Guest OSses: *NIX
Re: vb disk size
Assuming that the VDI was created as normal (dynamic) you need to compact the guest. See the manual section below.
http://www.virtualbox.org/manual/ch08.h ... -modifyvdi
http://www.virtualbox.org/manual/ch08.h ... -modifyvdi
Re: vb disk size
Perryg thanks for your response. After wrestling for hours I finally was able to run zerofree on the vm however when it came to compacting I got an error:
my vm file ends in '-disk1.vmdk', does this mean I have a fixed size disk and not a dynamic one? if so is there anything I can do about it?VBoxManage: error: Could not find file for the medium '/root/<vm>' (VERR_FILE_NOT_FOUND)
-
- Site Moderator
- Posts: 34369
- Joined: 6. Sep 2008, 22:55
- Primary OS: Linux other
- VBox Version: OSE self-compiled
- Guest OSses: *NIX
Re: vb disk size
You need to first convert it to a VDI as stated in the manual.