Differences

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

Link to this comparison view

Next revision
Previous revision
howto:vboxhowto [2012/08/24 16:22] – created adminhowto: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? =====
 +
 +First, make sure that the Virtual Box binaries are in your path. This is done by default on Linux, but in Windows, you might have to manually add the installation directory's bin folder to your path.
 +
 +Then, you need to know either your Guest OS name or UUID number. You can find both of these by typing
 +
 +  VBoxManage list vms
 +
 +into a terminal. From there, simply type
 +
 +  VBoxHeadless -s <Guest-OS-Name>
 +
 +or
 +
 +  VBoxHeadless -s <UUID>
 +
 +This launches the VM without attaching its display to a window. Now all you have to do is set this command as a boot-time service that runs in the background, and you'll be set.
  
 ===== Migration from VMWare to VBox ===== ===== Migration from VMWare to VBox =====
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