Virtualizing Windows on Physical Hardware into VirtualBox

The Path to Success: Physical Server converted to VirtualBox

SysInternals Disk2VHD is great as long as you use VHD format NOT VHDX ! ! !  Avoid VHDX if you want to use the resulting image in VirtualBox!!!  This holds true until you see that VirtualBox fully supports VHDX format.  Right now - October 2014 - CentOS7 - VirtualBox 4.3 - VHDX is supported as a "readonly" disk.  That means, you must convert VHDX to VHD (or something) before you can really use it.

So stick to VHD.  Uncheck the box for VHDX support !!! 

When you run Disk2VHD on your physical server with Windows, select ALL the partitions AT ONCE and create ONE (1) VHD file.  Do not make separate VHD files.  Make ONE.  Make sure you include the reserved system boot partition, plus your Windows7 operating system partition, plus any data partitions.

You can then use the resulting SINGLE VHD file on the IDE controller of your new VirtualBox machine.  You can probably use it in HyperV and VMWare but I only tested in Oracle VirtualBox.


OOPS made separate files

This error messages is symptomatic of having created separate VHD files for each partition, say if you tried to boot just the Win7 partition on the IDE controller:

Symptom: "a disk read error occurred" 

This will happen even if you convert from separate VHDX files to separate VDI files.  The boot sector details get lost when you make separate partition images.

OOPS VHDX

These error messages come up when you try to run with VHDX: 

"Failed to open the hard disk file" "Could not open the medium" "VD: error VERR_NOT_SUPPORTED opening image file"

If you have already gone with VHDX it is not entirely too late. You can convert VHDX to VHD using the command line tool available on Windows and Linux hosts.  This works if you have converted ALL relevant partitions.  While it will convert single partitions, the resulting image will not boot.  How do I know? I tried it.   

vboxmanage clonehd MYDATAFILE.VHDX --format VHD  mydatafile.vhd

Use the full path to each file if you are not converting files in the current directory. 

Windows:

vboxmanage clonehd d:\path\MYDATAFILE.VHDX --format VHD  e:\path\mydatafile.vhd

CentOS:

vboxmanage clonehd /home/path/MYDATAFILE.VHDX --format VHD  /home/path/mydatafile.vhd

Remember to set permissions such that the virtualbox "user1" can load the final file.
chown user1:vboxusers /home/path/mydatavile.vhd



Comments

Blogger said…
In case you are interested in earning cash from your traffic with popunder ads, you should try one of the most reputable networks: exoClick.
Chandrahaas said…


Really i am impressed from this post....the person who created this post is a genius and knows how to keep the readers connected..

Used Laptop in Chennai

Popular Posts