LinuxQuestions.org 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.
-FB
Skip to content, navigation.
LinuxQuestions.org 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.
-FB
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:
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:
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
This is easy enough:
vmware-uninstall-tools.pl
and you should see something like this:
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 X.org 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.
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:
A Virtual Machine consists of :
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:
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:
We can now move these to the destination system for import by VirtualBox.
You can import an ovf file into VirtualBox from the graphical user interface or the command-line.
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:
Now the moment of truth, Start it up...and we should see Oracle Enterprise Linux boot up under VirtualBox
Finally don't forget to install the VirtualBox Guest Additions which is the mirror image operation to removing the VMware Tools.
Once you have mounted the Guest Additions iso image you can run install them from the mounted directory using the command:
sh VBoxLinuxAdditions-x86.run
Like this:
And after a restart of the guest you are all set to go.
Migration is complete!
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.
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
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


Question: what do the following have in common?
Answer: They were all winners of InfoWorld's 2010 Technology of the Year awards.
-FB
With the clock ticking over to a new decade, now would seem to be a good time for a quick blog on timer interrupts in guests and how you can speed up your guests, while also lightening the load on your host, with the judicious use of a bit of guest configuration.
All operating systems make use of a system clock which ticks at a particular frequency. Common Linux distributions use kernels which drive the clock at 100Hz, 250Hz or 1000Hz. You can find out what your Linux kernel is configured for using this command:
grep CONFIG_HZ /boot/config-<kernel>
where kernel is the version of Linux you're running. The result of this command on my Oracle Enterprise Linux installation looks like this:
[root@localhost grub]# grep CONFIG_HZ /boot/config-2.6.18-164.el5 # CONFIG_HZ_100 is not set # CONFIG_HZ_250 is not set CONFIG_HZ_1000=y CONFIG_HZ=1000
...which tells me that my kernel is configured to use a 1000Hz clock tick.
In a virtualized environment this means that there will be lots of context switches as the host schedules the guest to deal with clock ticks which don't do very much. And this will become most visible by seeing a relatively high host cpu usage even when the guest is idle. (Note that the exact behaviour also depends on the host system. For example, the same OEL vm runs comfortably on my Mac host, but my Windows host gets very busy running it.)
If you see an idle Linux guest which is configured for a 1000Hz clock using up lots of host cpu cycles, you may want to reduce the clock frequency using the boot time parameter "divider=10". You can do this by adding the parameter manually as the grub boot loader starts, or by editing the grub configuration file as follows:
kernel /vmlinuz-2.6.18-164.el5 ro root=/dev/VolGroup01/LogVol00 rhgb quiet divider=10
Here is what my complete grub.conf looks like now:
This results in fewer context switches, a lighter host load (as measured by Window Task Manager) and faster guest execution. For example, the speed to boot my OEL vm (on a Windows 7 host) dropped from 115 seconds to 80 seconds which, according to my calculations, is a 30% increase in performance. Not bad for a simple bit of configuration 
-FB
The FatBloke loves movies at Christmas. So to add to the festive cheer, he has produced a couple of his own based on some of the new features of VirtualBox 3.1. This special, bumper Christmas double-bill features movies about Teleportation (is this how Santa gets about?) and Snapshots. You can watch in HD and full screen mode, but no 3D yet 
Merry Christmas
-FB
Some time ago we talked about virtual appliances as an easier way of distributing operating systems and even complete software stacks.
Well, for the first time there is now a Solaris 10 10/09 (aka u8) ovf available.
Just:

And after clicking Import you will get a sys-unconfig'ed Solaris 10.
On first boot you do the config and hey presto, you have Solaris 10 running in a vm.

For best results, don't forget to then install the VirtualBox Guest Additions by choosing Devices...Install Guest Additions from the VirtualBox menu.
-FB
(A little late, I know but last week was kinda busy...)
Even though the version number only moved from 3.0 to 3.1, last week's VirtualBox release was a significant one with lots of very cool, but also very useful, new features:
Teleportation is Live Migration++. It is the ability to move currently running virtual machines across different physical machines with no interruption as you do it. And whereas with Live Migration/vMotion the virtualization platforms have to be near identical to work, teleportation is powerful enough to cope with:
This means greater choice of platforms for customers, and interesting solution opportunities for our partners.
VirtualBox exposes the teleportation primitives via APIs which higher level logic can call to direct the teleportation process. For people looking to exercise these APIs you can use the VBoxManage command line tool, such as:
VBoxManage modifyvm <vm name> --teleporter on --teleporterport 1234 \ --teleporterpassword password --teleporteraddress <dns name/ip address>
VBoxManage controlvm <vm name> teleport --port 1234 \ --host <dns name/ip address> --password password
(I promise to do a dedicated posting on this real soon now.)
Taking snapshots is a great way of saving the state of a virtual machine at various points in its lifecycle. Until this release, VirtualBox only allowed you to revert to the last snapshot state but with 3.1, the Snapshot feature in VirtualBox has been given an overhaul and you can now:
This means that you can create sophisticated multi-generational snapshot trees, ideal for testing your software on previous generations of operating systems or Service Packs for example. Or put another way, you can go backward or forward in time to exactly the state of the snapshot that interests you.
For example, here is a snapshot tree where we can revert to whichever Windows XP Service Pack and IE version we need to:
This time there are improvements in:
Say you're using a Host-only network setup with a couple of vm's talking to each other, but then you need to do a Software Update of one of the vm's. This requires that you need Internet access. You can now switch to a networking mode, say NAT, on the fly without needing to close down the vm.
Storage handling changed in 3.1 with the most obvious benefit now being that you can have multiple CDs attached to a guest. This meant quite some changes in the GUI and command line.
For people defecting to VirtualBox but wanting to bring all their worldly goods with them, we now support Parallels .hdd virtual disk format files.
Using a Solaris notebook or PC? Then we're now using the later Nevada (124+) build USB features.
Some operating systems (e.g. Fedora) are moving to using the Extensible Firmware Interface (EFI) in place of a more traditional BIOS firmware. VirtualBox 3.1 introduces experimental support for this.
These are just some of the headline features. You can get a fuller list from the ChangeLog, but all-in-all a pretty good crop of features and consistent with the mission to make VirtualBox the best hypervisor out there.
-FB
A little something that had me scratching my head for a while and may save others some time....
When you try to close the window of a VirtualBox virtual machine session, a dialog pops up thus:
In the past, the "Send the Shutdown signal" has sent a Powerdown message which caused Windows XP vm's to gracefully shutdown.
But on Windows 7 vm's, the default Power Options when installed on a laptop are undefined:
So to get the previous behaviour you need to change the Power Options as follows:
Hope this saves someone some time.
-FB
In the spirit of, "Hey we fixed a bunch of bugs, why hold on to them?" VirtualBox 3.0.12 was released today.
You could read about the fixes or just go get the new version.
-FB
VirtualBox 3.0.10 just released!
Among other things this maintenance release:
It is available to download from the Usual Places .
-FB
The hard-drive(s) of your virtual machines are simply files which are stored typically on the host's filesystem. On my Mac they're in
~/Library/VirtualBox/HardDisks/
VirtualBox understands several disk formats including:
This means that if you have an existing hard drive from another virtualization platform, you can plug it into a VirtualBox vm by telling the system about it using the Virtual Media Manager...
And then configuring it in the vm's Storage configuration dialog (or via the command line):
Given that VirtualBox not only understands, but can also create, these different formats, one obvious question is "what is the difference?" or "which one is best?"
One of the VirtualBox team (thanks Klaus) explained:
"The major difference is that VDI uses relatively large blocks (1MB) when growing an image, and thus has less overhead for block pointers etc. but isn't ultimately space efficient in the sense that if a single byte is non-zero in such a 1MB block the entire space is used.
VMDK in contrast uses 64K blocks, and thus has more management overhead and generally a bit less disk space consumption
What offsets this is that VDI is more efficient when it comes to snapshots."
So now you know!
- FB
VirtualBox marches on with the new version 3.0.6 maintenance release focused on performance and stability. If you use AMD, then this is Christmas morning
And a few Snow Leopard wrinkles were ironed out too.
Version 3.0.6 also has a few changes in support of the embryonic VirtualBox Web Console project.
The 3.0.6 maintenance release was made available to download from the Usual Places earlier today.
For a fuller list of fixes check out the ChangeLog.
-FB
This blog copyright 2010 by TheFatBloke