User Tools

Site Tools


virtualbox

Installing Guest Additions

  • On the host system, click Devices → install guest additions
  • For a Linux VM, open a terminal and run:
 $ sudo apt-get install build-essential
 $ sudo /media/cdrom/VBoxLinuxAdditions-amd64.sh
  • For a Windsows VM, open “Computer”, the virtual CD, then double click on VBoxWindowsAdditions.exe
  • reboot

Accessing Shared folders

  1. Enable a shared folder under Virtualbox → Settings → Shared Folders → Add folder icon
  2. Select a folder from your desktop, give it a name (ex. sharename), and select Auto Mount
  3. Install the latest Guest Additions in the virtual machine (see above)
  4. Mount the folder on your virtual machine
    • Windows vm: run the command “net use x: \\vboxsrv\sharename
    • Linux vm: run the command “sudo mount -t vboxsf sharename /media/examplemountpoint”

Troubleshooting

  • If your Windows 7 host does not resolve local DNS, go to Network and see if there is a second connection for VBox. Delete it. (VirtualBox version 2.0)

Performance Tuning

Based on Version: 4.0.2, Host: Mac OS X 10.6.6, Guest: Windows 7

Storage

  • Use fixed-sized, write-through .vdi files. Either create them from the beginning, or convert with the following instructions:
  % VBoxManage clonehd --format VDI --variant Fixed file.vmdk file.vdi
  % VBoxManage modifyhd --type writethrough file.vdi
  % VBoxManage modifyhd --resize <megabytes> file.vdi # if needed
  % VBoxManage showhdinfo file.vdi
  • The –resize option only allows expanding the capacity of an existing image. If you need to shrink it follow these steps:
 Shrink the OS volume with Windows 7's Disk Management console (for Windows XP you will need a 3rd party partition manager)
 % VBoxManage createhd --filename small.vdi --size <megabytes> - Make sure to match --size (specified in MB) with the size of the shrunk volume (specified in GB)
 % VBoxManage clonehd --existing filevdi small.vdi
  • To compact a dynamcially expanding storage:
 Zero out the free space => e.g. with sdelete -c (Microsoft tool) or the Drive Wiper tool that comes with CCleaner
 % VBoxManage modifyhd --compact file.vdi  
  • Use SATA controller on Port 4 or higher to avoid IDE compatibility mode – which disable async i/o
  • Disable Shared Folders, if possible – it uses a virtual networking layer.
  • Do not use Snapshots – it triggers 'differencing' storage mode.

Display

  • Use 64MB or more
  • Use 2D hardware acceleration and fullscreen mode on a dedicated display.
  • Do not use VRDP or RDP, if possible.
virtualbox.txt · Last modified: 2012/02/07 11:32 (external edit)