Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
howto:vboxhowto [2015/04/16 16:26] – external edit 127.0.0.1howto:vboxhowto [2021/03/04 01:05] (current) – [Reference] admin
Line 1: Line 1:
 ====== Oracle VM Virtual Box Tricks ====== ====== Oracle VM Virtual Box Tricks ======
 +
 +===== How to compact VM disk file =====
 +
 +For Linux VM, first you need to zero out the data on the disk:
 +  sudo dd if=/dev/zero of=zero.tmp bs=10M; rm -f zero.tmp
 +
 +zerofree command should be better but there are problems running it on Ubuntu systems
 +
 +Next shutdown the VM and run the VBoxManage.exe modifyhd compact
 +  c:\Program Files\Oracle\VirtualBox>VBoxManage.exe modifyhd "c:\VirtServer\VmDiskFile.vdi" compact
 +
 +==== Reference ====
 +  * https://www.ateam-oracle.com/methods-of-compacting-a-disk-image-file
 +  * https://askubuntu.com/questions/1092812/zerofree-on-ubuntu-18-04
 +  * https://superuser.com/questions/529149/how-to-compact-virtualboxs-vdi-file-size
  
 ===== How can I start a VM without getting a window? ===== ===== How can I start a VM without getting a window? =====
howto/vboxhowto.txt · Last modified: 2021/03/04 01:05 by admin
CC Attribution-Noncommercial-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0