Skip to main content

VirtualBox

Configuration

Guest Additions1

  1. Devices menu -> Insert Guest Additions CD image menu

  2. In command line, mount the CD:

mount /dev/cdrom /media/cdrom
  1. Install dependencies:
apt-get update && \
apt-get install build-essential dkms linux-headers-$(uname -r)
  1. Run installation script:
/media/cdrom/./VBoxLinuxAdditions.run
  1. Reboot VM
sudo shutdown -r now
  1. Verify
lsmod | grep vboxguest

Fine Tuning Timers and Time Synchronization

./VBoxManage setextradata <vm-name> "VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled" 0

./VBoxManage guestproperty set <vm-name> "/VirtualBox/GuestAdd/VBoxService/timesync-set-on-restore" 1

Commands

Compact guest virtual disk2

./VBoxManage.exe modifyhd "X:\path\to\hdd.vdi" --compact

Convert virtual disk format

./VBoxManage.exe clonehd <source> <target> --format <vhd|vdi>

REFERENCES


  1. Enables mounting Shared Folders to instance via GUI or run mount -t vboxsf shared ~/shared from host.
  2. Only works on vdi disk format.