Friday Aug 13, 2010

The VirtualBox Software Development Kit

One of the really neat things about VirtualBox is the elegance with which it is architected. At almost every layer there are published APIs which mean you can build really neat solutions to access the underlying services of VirtualBox. And the "front ends" to VirtualBox such as the GUI (VirtualBox.exe) and the Command Line (VBoxManage.exe) use these same public API's without no backdoors or private interfaces at all. Graphically, it looks like this:

VirtualBox API

Third parties are also building cool solutions against these interfaces too. (BTW you really should checkout the still-under-development but hugely impressive phpvirtualbox)

And so, as the VirtualBox ecosystem grows, it's important that people stick to the APIs. So, if in doubt, consult the VirtualBox Programming Guide and Reference.

We hope you enjoy a little bedtime reading ;-)


Monday Aug 09, 2010

VirtualBox 3.2.8 is released

The Fat Bloke may sleep but the VirtualBox engineering team never seems to... Version 3.2.8, a maintenance release, was made available from the Usual Places late last week.

It fixes a bunch of stuff.

- FB 

Tuesday Jul 27, 2010

VirtualBox log files

OK, I have to admit that this entry is one for the connoisseur, but some of these blogs entries double up as my extended memory, so before I forget... ;-)

One of the key tools you can use to diagnose any issues with VirtualBox is the VirtualBox log file for a vm session. VirtualBox always creates a log file which reflects the lifecycle of the virtual machine.

Log File Location

VirtualBox log files live in a per-user/per-vm directory that will be something like:

  • On Windows, this is %HOMEDRIVE%%HOMEPATH%\\.VirtualBox\\Machines\\<vm name>\\Logs; typically some- thing like C:\\Documents and Settings\\Username\\.VirtualBox\\Machines\\<vm name>\\Logs\\vbox.log
  • On Mac OS X, this is $HOME/Library/VirtualBox/Machines/<vm name>/Logs
  • On Unix-like systems (Linux, Solaris), this is $HOME/.VirtualBox/Machines/<vm name>/Logs

The log files are rotated such that the most recent is always called vbox.log and older ones are vbox.log.[123]. These log files contain lots of information about the capabilities of both the host and the guest vm and should be provided whenever reporting issues with VirtualBox. 

Log File Format 

The layout of the logfile varies based on whether you are resuming or starting initially but roughly follows this pattern:

Section Content Starts around...


VirtualBox version;
Host OS information;
Host hardware info 

Start of file


A listing of the configuration information of guest (guest virtual hardware)

\*\*\* CFGM dump \*\*\*

Host information (CPUID Dump)

Low level CPU information of Host and what will be reflected to Guest
\*\*\* CPUID dump \*\*\*

Creating the VM Information about the creation of the virtual machine environment
\*\*\* End of CPUID dump \*\*\*

Powering on or Loading from a saved state 

When powering on you'll see very little in the logs at this stage.  If loading from a saved state, information from the Saved State Manager about matching previous state to current environment.
Changing the VM state from 'CREATED' to 'POWERING_ON'

Changing the VM state from 'CREATED' to 'LOADING' 


Once the saved state is loaded, or the vm is booted, the guest code is executed.

Changing the VM state from 'POWERING_ON' to 'RUNNING'


Changing the VM state from 'LOADING' to 'SUSPENDED'

Changing the VM state from 'SUSPENDED' to 'RESUMING'.

Guest lifetime

This part of the log contains entries concerning the lifetime of the Guest.

Changing the VM state from 'RESUMING' to 'RUNNING'.


Powering Off or Suspending A dump of the guest state at the time the vm was powered off.

\*\*\* Guest state at power off \*\*\*


The statistics collected during the session are dumped out.

\*\*\* Statistics \*\*\*


One final tip when you're looking to make sense of log files: each line begins with a timestamp. e.g. 

00:00:01.817 VRDP: TCP server listening on port 3389.

This is in the format and is usually relative to the start of the vm. If you prefer wall clock time you can set the environment variable before starting the vm:

 export VBOX_RELEASE_LOG_FLAGS=time; VBoxManage startvm Android

 - FB

Saturday Jun 26, 2010

VirtualBox 3.2.6 is released!

The 3.2.6 maintenance release was made available to download from the Usual Places yesterday.

It fixes a bunch of stuff.

- FB 

Monday Jun 21, 2010

Free VirtualBox Webinar

  • What: The VirtualBox team are running a free live webinar this week:  "What's new in Oracle VM VirtualBox 3.2?"
  • When: Thurs 24th June, 9am Pacific Daylight Time
  • Who: Andy Hall and Achim Hasenmueller
  • Where: Signup for it now

VirtualBox 3.2

- FB 

Monday Jun 07, 2010

VirtualBox 3.2.4 is released!

Thanks to all in the community who spotted a couple of regressions with 3.2.2. We couldn't let them pass and so have updated VirtualBox to version 3.2.4 to fix them.


Friday Jun 04, 2010

Migrating from VMware to VirtualBox (Part 2): Windows

In part 1 of this mini-series about how to move from VMware to VirtualBox we described how to move an Oracle Enterprise Linux vm. In this instalment we'll look at moving a Windows XP vm. It's worth noting that the same basic process will be followed:

  1. Pre-migration tasks - uninstall VMware tools and drivers
  2. Export from VMware - we'll use OVF as the mechanism to transfer the disk and vm configuration
  3. Import to VirtualBox - the VirtualBox import wizard makes this very easy;
  4. Post-migration tasks - finally we'll install the VirtualBox Guest Additions (analogous to VMware tools) 

OK so here is our starting point: A Windows XP vm running inside VMware Workstation 7.1:

VMware Workstation

Pre-Migration Tasks

Uninstalling VMware Tools is straightforward in Windows by choosing Add/Remove Programs in the Windows Control Panel and clicking on Remove:

Uninstall VMware Tools

Once you have removed VMware Tools you can shutdown Windows and Close the VM.

Export from VMware 

From the VMware Workstation File... menu we can now Export the vm:


In the Conversion Wizard, the Source type should be "Other" because this is a Workstation vm:

Source Type

...and select the VMware vmx configuration file:

Select the vmx file

At this point, the Conversion Wizard warned me that it cannot configure the source image, but this can be safely ignored:


 ...and you can continue selecting which disks to export:


 When we reach the point in the Conversion Wizard where we select the destination type, we should choose "Virtual Appliance":

Virtual Appliance

...before choosing the filesystem location for the exported appliance. Here, I am just calling it "MyXPPC" and dropping it on my Desktop:

Name of destination appliance

If required you can describe a few more details about this virtual appliance:

Appliance details

 ...before choosing how to package the appliance. Here I chose a "Folder of Files" and did not create a manifest file, which is a digest or checksum file. (With Workstation 7.1 and VirtualBox 3.2 there seems to be a disagreement on the SHA1 digest so we're not using one here).

Packaging choices

The network dialog is the last stage:


Then we confirm our selections and the export process starts: 


This time it takes to complete this stage is a function of the size of your disk but can take some time. But on completion you have a folder which contains:

  • .ovf file - an XML description of the vm (e.g. number of CPUs, amount of RAM, etc.)
  • .vmdk - a Compressed VMDK file containing the contents of the vm's hard drive(s)

 Here are the results of my export process:

Folder of files

Importing into VirtualBox

Having exported the vm we can now import it into VirtualBox. BTW you can move this vm onto a totally different physical machine at this point, but I'm going to simply pull it into VirtualBox on the same Windows 7 host.

So close VMware Workstation and start up VirtualBox, and from the File menu choose Import Appliance:

Import Appliance...

The VirtualBox Appliance Import Wizard will ask you to choose the appliance (.ovf file) you want to import, so let's select MyXPPC.ovf:

Choose appliance

The wizard reads the ovf data and shows the settings it is about to use. At this point you can modify the settings by double clicking on a value.

Now this is an important bit....For me, the Guest OS Type was set to "Other/Unknown" but we need to set it to "Windows XP": (for the experts: this instructs VirtualBox to turn on IO-APIC) 

Windows XP guest type

So here are my final settings:

Import settings

Clicking on Finish starts the Import process:


Again, the time this takes depends on your vm's disk size but at the ned of the import process you will have a vm in the VirtualBox GUI window with the name of the appliance, in our case "MyXPPC":

VirtualBox GUI

Post-Migration Tasks

 If you start up the vm at this point you'll see something like this:

VirtualBox without Additions

But for best results you now need to install the Guest Additions. To do this, choose Device...Install Guest Additions:

Install Guest Additions

And follow your nose:

Guest Additions

After installing the Guest Additions you will need to reboot:

Reboot after Guest Additions

 But after you've done this you have a fully migrated Windows XP vm!

Windows XP running under VirtualBox

Easy, right? 

Epilogue (Advanced users only)

For those people who read to the end of a blog before jumping in, here's a bonus ;-).... 

There is a faster alternative to step 2 and 3 above for people who know what they are doing.

After performing Step 1 you could simply take the VMware disk image (.vmdk) and plug this into an appropriately configured VirtualBox vm. This effectively relies on the user creating a vm which is similar to the vm configuration in VMware, instead of relying on the ovf export and import (Steps 2 and 3 above) process.

To take this shortcut:

Create a New vm in VirtualBox for Windows XP:

new VM

When you asked about a Virtual Hard Disk, tell the Wizard that you want to use an existing disk and specify the original VMware vmdk by clicking on the folder icon and adding it to the Virtual Media registry:

Existing Disk

Before you turn this vm on, be sure to change a setting in the System...MotherBoard tab, to enable IO APIC:


Now start up the VM. Don't forget to install the post-migration step of installing the Guest Additions.

- FB 

Wednesday Jun 02, 2010

Oracle VM VirtualBox 3.2.2 is released!

The maintenance release, VirtualBox 3.2.2 improves stability and rectifies regressions, and is available now from the usual places.


Wednesday May 19, 2010

VirtualBox 3.2 is released! A Red Letter Day?

Big news today! A new release of VirtualBox packed full of innovation and improvements. Over the next few weeks we'll take a closer look at some of these new features in a lot more depth, but today we'll whet your appetite with the headline descriptions.

To start with, we should point out that this is the first Oracle-branded version which makes today a real Red-letter day ;-) 

Oracle VM VirtualBox 3.2

Oracle VM VirtualBox

Version 3.2 moves VirtualBox forward in 3 main areas ( handily, all beginning with "P" ) : performance, power and supported guest operating system platforms.  Let's take a look:


  • New Latest Intel hardware support – Harnessing the latest in chip-level support for virtualization, VirtualBox 3.2 supports new Intel Core i5 and i7 processor and Intel Xeon processor 5600 Series support for Unrestricted Guest Execution bringing faster boot times for everything from Windows to Solaris guests;

  • New Large Page support – Reducing the size and overhead of key system resources, Large Page support delivers increased performance by enabling faster lookups and shorter table creation times.

  • New In-hypervisor Networking – Significant optimization of the networking subsystem has reduced context switching between guests and host, increasing network throughput by up to 25%.

  • New New Storage I/O subsystem – VirtualBox 3.2 offers a completely re-worked virtual disk subsystem which utilizes asynchronous I/O to achieve high-performance whilst maintaining high data integrity;

  • New Remote Video Acceleration – The unique built-in VirtualBox Remote Display Protocol (VRDP), which is primarily used in virtual desktop infrastructure deployments, has been enhanced to deliver video acceleration. This delivers a rich user experience coupled with reduced computational expense, which is vital when servers are running hundreds of virtual machines;


  • New Page Fusion – Traditional Page Sharing techniques have suffered from long and expensive cache construction as pages are scrutinized as candidates for de-duplication. Taking a smarter approach, VirtualBox Page Fusion uses intelligence in the guest virtual machine to determine much more rapidly and accurately those pages which can be eliminated thereby increasing the capacity or vm density of the system;

  • New Memory Ballooning– Ballooning provides another method to increase vm density by allowing the memory of one guest to be recouped and made available to others;

  • New Multiple Virtual Monitors – VirtualBox 3.2 now supports multi-headed virtual machines with up to 8 virtual monitors attached to a guest. Each virtual monitor can be a host window, or be mapped to the hosts physical monitors;

    Multiple Virtual Monitors

  • New Hot-plug CPU's – Modern operating systems such Windows Server 2008 x64 Data Center Edition or the latest Linux server platforms allow CPUs to be dynamically inserted into a system to provide incremental computing power while the system is running. Version 3.2 introduces support for Hot-plug vCPUs, allowing VirtualBox virtual machines to be given more power, with zero-downtime of the guest;

  • New Virtual SAS Controller – VirtualBox 3.2 now offers a virtual SAS controller, enabling it to run the most demanding of high-end guests;

  • New Online Snapshot Merging – Snapshots are powerful but can eat up disk space and need to be pruned from time to time. Historically, machines have needed to be turned off to delete or merge snapshots but with VirtualBox 3.2 this operation can be done whilst the machines are running. This allows sophisticated system management with minimal interruption of operations;

  • New OVF Enhancements – VirtualBox has supported the OVF standard for virtual machine portability for some time. Now with 3.2, VirtualBox specific configuration data is also stored in the standard allowing richer virtual machine definitions without compromising portability;

  • New Guest Automation – The Guest Automation APIs allow host-based logic to drive operations in the guest;


  • New USB Keyboard and Mouse – Support more guests that require USB input devices;

  • New Oracle Enterprise Linux 5.5 – Support for the latest version of Oracle's flagship Linux platform;

  • New Ubuntu 10.04 (“Lucid Lynx”) – Support for both the desktop and server version of the popular Ubuntu Linux distribution;

    And as a man once said, "just one more thing" ...

  • New Mac OS X Server (experimental) – On Apple hardware only, support for creating virtual machines run Mac OS X Server.

    All in all this is a pretty powerful release packed full of innovation and speedups.

    So what are you waiting for


Monday May 10, 2010

VirtualBox 3.1.8 released!

Supporting new platforms such as Ubuntu 10.04 (Lucid Lynx) and delivering a host of bugfixes, VirtualBox 3.1.8 is available now from the usual places.


Thursday Mar 25, 2010

VirtualBox 3.1.6 released!

The 3.1.6 maintenance release was made available to download from the Usual Places earlier today.

It fixes a bunch of stuff.

- FB 

Friday Feb 12, 2010

VirtualBox 3.1.4 released!

As an old friend of mine once said "Small opportunities are often the beginning of great enterprises". And so it is with that thought in mind we're pleased to announce the VirtualBox 3.1.4 maintenance release.

This release improves stability and fixes quite a few bugs. For gory details of what was fixed check out the ChangeLog.

Or just go ahead and download it.


Wednesday Feb 10, 2010

Virtualization Product of the Year? ran a poll to find "Products of the Year" in various categories.

A pretty good result in the Virtualization section for VirtualBox - the People's Hypervisor ;-)

Thanks to all who voted. 


Tuesday Feb 09, 2010

Migrating from VMware to VirtualBox (Part 1): Oracle Enterprise Linux

There are a growing number of people asking the question: how do you move a VMware virtual machine to VirtualBox. So it is about time the Fat Bloke rolled up his sleeves and showed us how. (BTW you can click on screenshots below to magnify)

People typically want to do this because they have spent time installing a guest OS together with a software stack and they don't really want to go thru all this again. But moving a vm from one virtualization platform to another is analogous in the real world to unplugging a hard drive(s) from one computer and plugging it into a different manufacturer's computer. You may find that the guest operating system gets upset when it boots up and sees virtual hardware which is different than it was expecting. Different guest operating systems react differently to this situation (Linux is typically more accommodating than Windows in this respect).  In fact some guest operating systems get so upset, they may BSOD (Blue Screen of Death) on you.

Secondly, some of the software that you have installed above the OS, such as VMware Tools, may also be relying on specific virtual hardware.

So the Fat Bloke's First Rule of VM Migration is: Don't, if you can help it. If you can create a new vm from scratch on the new virtualization platform, you probably should. That way the guest OS installs the right drivers for your particular virtual hardware, and you are not left with orphaned software which needs a specific virtualization layer.

That said, there are still going to be people looking to avoid a complete reinstallation and willing to live dangerously, so let's discuss what is possible. Note that because different guests behave so differently we're going to focus on one guest OS in this blog: Oracle Enterprise Linux, and we'll move it from VMware Workstation 7 to VirtualBox 3.1. Here is our start state, the vm running in VMware Workstation 7 on Windows 7:

Starting Position

Step 1 - Preparing to Migrate 

It's a good idea to take a copy of the vm that we're trying to migrate just in case you make a mess of things. With VMware Workstation you can clone a vm to do this or copy the machine in some other way such as copying files.


To prepare for migration we're going to remove virtualization platform-specific components:

  1. Remove VMware tools
  2. Reset the Display and Input device  configuration
  3. Remove incompatible devices 

The Fat Bloke's Second Rule of VM Migration is that it is easier to unpick platform-specific software on the native virtualization platform. So let's start up the vm under VMware to prepare for migration

Removing VMware Tools 

This is easy enough:

and you should see something like this:

uninstall tools

Resetting the Display Device and Input Devices

When Oracle Linux was first installed the display was set as a VMware display adaptor and input devices as a VMware keyboard and mouse. By the time we're finished this won't be the case, so let's prepare for that by moving aside the the OEL conf file like this:

mv /etc/X11/xorg.conf /etc/X11/xorg.conf.vmware

This file will get recreated later when we run on the VirtualBox platform.

Now let's shutdown the guest. 


Remove Incompatible Devices

The VMware soundcard device is different from the one that VirtualBox exposes so let's remove this device from the vm configuration in the VMware Settings dialog:

Remove Soundcard

Step 2 - Exporting the Virtual Machine

A Virtual Machine consists of :

  • configuration information (in VMware a .vmx file)
  • virtual hard drive(s) which the guest is installed on. (in VMware, typically .vmdk files)

An emerging standard for encapsulating this information to allow vm's to be transported more easily is the OVF or Open Virtualization Format. So in theory you should be able to Export this vm from VMware Workstation and Import into VirtualBox. Sadly, the VMware conversion wizard (File...Import or Export...) doesn't support Oracle Enterprise Linux as a guest:

can't export

But there is a command line ovftool that can be downloaded from VMware's site.

So in a Windows command.exe window you can run:

cd C:\\Users\\fatbloke\\Documents\\Virtual Machines\\Clone of Oracle Enterprise Linux 
"\\Program Files\\VMware\\VMware OVF Tool"\\ovftool.exe "Clone of Oracle Enterprise Linux.vmx" OEL.ovf 

And eventually you end up with 3 files:

  1. OEL.ovf - configuration information
  2. OEL-disk1 - compressed disk format file
  3. -  digital signatures (SHA1) of the other files.

 We can now move these to the destination system for import by VirtualBox.

Step 3 - Importing into VirtualBox 

You can import an ovf file into VirtualBox from the graphical user interface or the command-line.

Import OVF

Importing this takes a while as the compressed disk is converted to a usable format, but your should end up with a new entry in your vm list in VirtualBox like this:

Imported vm

 Now the moment of truth, Start it up...and we should see Oracle Enterprise Linux boot up under VirtualBox

OEL under VirtualBox

 Step 4 - Install the VirtualBox Guest Additions

 Finally don't forget to install the VirtualBox Guest Additions which is the mirror image operation to removing the VMware Tools.

Install Guest Additions

Once you have mounted the Guest Additions iso image you can run install them from the mounted directory using the command:


 Like this:

Install GA

And after a restart of the guest you are all set to go.

Migration is complete! 

Epilogue (Advanced users only)

There is an alternative to step 2 and 3 above for people who know what they are doing.

After performing Step 1 you could simply take the VMware disk image (.vmdk)  and plug this into a manually configured VirtualBox vm. This effectively relies on the user to create an appropriately similar vm instead of relying on the ovf export and import (Steps 2 and 3 above) process. Note that the default disk controller used by VMware is an LSI SCSI controller, so when manually creating a VirtualBox vm you need to configure it appropriately. 

Add SCSI Controller

You still need Step 4 for optimal performance and ease of use. And don't forget the tip about Speeding up Linux Guests too.

Good Luck!

- FB 

Friday Jan 15, 2010

Audio in 64-bit Windows guests

In case you haven't noticed, a lot of Fat Bloke's Blogs are reminders to self ;-) Here's another one... 

If you have created a 64-bit Windows 7 virtual machine, you may think it is awfully quiet. This is because the 64-bit version of Windows 7 does not ship with drivers for the audio device (AC 97) which VirtualBox presents to the guest OS.

If you want audio you have to go get the drivers and install them yourself. I got mine from Realtek site. 

Once you have installed them, and rebooted, you should get audio just fine.

- FB 


Fat Bloke


« July 2016