Software Notes: VirtualBox

VirtualBox has become my desktop virtualization software of choice for both Windows and Mac hosts. I’ve used it on Windows for years but stuck to VMware Fusion on the Mac, only recently replacing it. It’s not as polished as VMware Fusion but gets the job done. This post is a collection of notes and tips I’ve collected. It will be updated over time, rather than creating new posts. The last update was Nov 17, 2012.

These all worked for me on Windows and OS X with VirtualBox 4.2. They should work on Linux too, but I haven’t tried them. On OS X run the commands from a terminal windows. On Windows run them from a command prompt.

Click on any image to see it full size.

Converting a Virtual Disk type

I converted several VMs from VMware Fusion. While the VMware VMDK disk format can be used to run a VM, not all features are supported, such as resizing. This command line can be used to convert the disk. NOTE: The command line below doesn’t properly display the double-dashes in the command. the format and variant parameters are both preceded by two dashes.

vboxmanage clonehd  “/path/to/source/disk/image.vmdk” “/path/to/destination/disk/image.vdi –format VDI –variant standard

The VMs using the disk will not be automatically updated. After the conversion remove the old disk image from the VM and attach the new one.

Expanding A Virtual Disk

I started getting low disk warnings on a couple VMs so needed to expand the virtual disks. Note: Again, the resize parameter is preceded by two dashes.

vboxmanage modifyhd “/path/to/disk/to/expand.vdi” –resize 30720

The new disk size will be reflected in the VM properties:

The new disk size is show in properties
New Disk Size Shown

It’s not reflected on the running Virtual Machine for Windows VMs.

Screenshot of drive properties

It is available but not allocated in Disk Manager.

Disk Manager Screenshot
Newly Added Space is unallocated

Expand Drive C: to use the new space. Right-Click the drive C: partition and select ‘Extend Volume” and run the wizard to use all the available space. The default values work for this.

Screenshot showing expanded drive Screenshot of drive C in Computer

Recently Published VirtualBox Articles

Moving a VirtualBox virtual machine

Manually installing guest additions

All VirtualBox articles have the VirtualBox tag.

%d bloggers like this: