Search This Blog

Friday, October 15, 2010

Convert VDI to VHD

I recieved a Virtual Machine, that was build in Oracle Sun Virtual Box, and needed to be converted to run in Microsoft Virtual PC, and eventually on Microsoft Hyper-V;

I have found a number of articles, and this article/post was the only one that worked.

1. Convert the .vdi file to a raw disk image (.raw)
Perform a search on your system for existing .vdi files that you are going to convert.

a. Go to a cmd prompt and navigate to the VirtualBox folder (typically c:\program files\sun\VirtualBox).

b. Execute the following command against the .vdi file in question:

vboxmanage.exe internalcommands converttoraw "x\path-to-vdi\diskimage.vdi" "x:\path-to-output-folder\diskimage.raw"

Depending on the size of your .vdi file, the time for conversion may greatly vary.

Also, be sure you have around 2 times the available drive space
that your existing .vdi currently consumes on your logical volume.

2. Convert .raw disk image to .vmdk format using WinImage

a. Open WinImage, click on 'Disk'> 'Convert Virtual Hard Disk image...'

b. Next to the 'File name:' field, click on the file type drop-down and select 'All files (*.*)'.

c. Navigate to the location where you stored your outputted .raw disk file and double-click it.

d. Choose whether you wish to 'Create Fixed Size Virtual Hard Disk' or
'Create Dynamically Expanding Virtual Hard Disk' (I typically pick the latter) and click 'OK'.

e. Navigate to a folder where you wish to store the newly converted image to. Next to
'Save as type:' (for the sake of this How-to) choose 'VMWare VMDK (*.vmdk). and click 'Save'.

You should see a 'Reading disk' progress indicator giving you the status of the conversion process.
I've converted 30Gb images in about 10 minutes or less...but I have no firm numbers.

f. Once the conversion is complete, you'll see a dialog box that will ask you if you wish to connect to the partition. Click 'OK' if you wish to view the contents.

3. Import your disk images into your existing Virtual Infrastructure

Now that the files are converted, copy or move your converted disk image files to your virtualization software's datastore/disk storage folder.
Once moved/copied, you should now be able to create a new Virtual Machine and utilize the disks you just converted.
Note that you will need to install the proper guest additions/tools to the virtual machine when you get it booted, so you will likely not have
network access right off the bat.

Thursday, October 14, 2010

Top 10 Mistakes When Building and Maintaining a Database

Building and maintain a SQL Server database environment takes a lot of work. There are many things to consider when you are designing, supporting and troubleshooting your environment. This article identifies a top ten list of mistakes, or things that sometimes are overlooked when supporting a database environment.