Monday Jun 07, 2010
Friday Jun 04, 2010
By Fat Bloke on Jun 04, 2010
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:
- Pre-migration tasks - uninstall VMware tools and drivers
- Export from VMware - we'll use OVF as the mechanism to transfer the disk and vm configuration
- Import to VirtualBox - the VirtualBox import wizard makes this very easy;
- 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:
Uninstalling VMware Tools is straightforward in Windows by choosing Add/Remove Programs in the Windows Control Panel and clicking on Remove:
Once you have removed VMware Tools you can shutdown Windows and Close the VM.
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:
...and select the VMware vmx configuration 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":
...before choosing the filesystem location for the exported appliance. Here, I am just calling it "MyXPPC" and dropping it on my Desktop:
If required you can describe a few more details about this virtual appliance:
...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).
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:
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:
The VirtualBox Appliance Import Wizard will ask you to choose the appliance (.ovf file) you want to import, so let's select MyXPPC.ovf:
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)
So here are my final 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":
If you start up the vm at this point you'll see something like this:
But for best results you now need to install the Guest Additions. To do this, choose Device...Install Guest Additions:
And follow your nose:
After installing the Guest Additions you will need to reboot:
But after you've done this you have a fully migrated Windows XP vm!
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:
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:
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.
Wednesday Jun 02, 2010
Wednesday May 19, 2010
By Fat Bloke on May 19, 2010
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
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;
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.
Monday May 10, 2010
Friday Feb 12, 2010
By Fat Bloke on Feb 12, 2010
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
Tuesday Feb 09, 2010
By Fat Bloke on Feb 09, 2010
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:
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:
- Remove VMware tools
- Reset the Display and Input device configuration
- 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:
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 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.
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:
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:
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:
- OEL.ovf - configuration information
- OEL-disk1 - compressed disk format file
- OEL.mf - 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.
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
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.
Once you have mounted the Guest Additions iso image you can run install them from the mounted directory using the command:
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.
You still need Step 4 for optimal performance and ease of use. And don't forget the tip about Speeding up Linux Guests too.
Friday Jan 15, 2010
By Fat Bloke on Jan 15, 2010
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.
Wednesday Jan 06, 2010
By Fat Bloke on Jan 06, 2010
Question: what do the following have in common?
- Intel Nehalem Processor
- Microsoft Windows 7
- Cisco's Unified Computing System (UCS)
- Amazon Web Services
- Apple iPhone OS
- Sun VirtualBox
Answer: They were all winners of InfoWorld's 2010 Technology of the Year awards.
Monday Jan 04, 2010
By Fat Bloke on Jan 04, 2010
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:
- Edit /boot/grub/grub.conf
- Duplicate the existing Title section, and rename it (this means you can choose at boot time which config to use)
- Add the "divider=10" parameter as follows:
kernel /vmlinuz-2.6.18-164.el5 ro root=/dev/VolGroup01/LogVol00 rhgb quiet divider=10
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
Thursday Dec 24, 2009
By Fat Bloke on Dec 24, 2009
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
Thursday Dec 17, 2009
By Fat Bloke on Dec 17, 2009
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.
- Download the appliance
- Unzip (if not done automatically for you)
- Then in VirtualBox, choose the File...Import Appliance menu item
- Navigate to the ovf file and import
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.
- FatBloke Sings his Last (at Oracle)
- What's New in SGD 5.1?
- Cloning from a given point in the snapshot tree
- What's New in VirtualBox 4.3?
- Airbus and SGD
- Controlled Application Deployment with Secure Global Desktop
- 3D Acceleration with Ubuntu guests
- Using VirtualBox to test drive Windows Blue
- What's New in Oracle VDI 3.5?
- Upgrading Linux Guests