Friday, December 4, 2009

Convert a USB flash img file to vdi for use in Virtualbox

Operating Systems may be packaged as a IMG file, meant to be copied to a portable disk like a USB pen drive. Ubuntu Netbook Remix and Moblin are available as IMG files. Now if you are interested in running these operating system flash images in VirtualBox, you will have to convert the IMG file to a VDI file (VirtualBox image).
1. Download the USB boot image (IMG file) of the OS and save it to a location on your hard drive.
2. Fire up a terminal and navigate to the directory in which you saved the IMG file.
3. Run the VBoxManage tool from the command line.
$ VBoxManage convertdd image.img image.vdi
4. You may copy the newly created VDI (VirtualBox image) to a directory of your choice. Now it is ready for use in VirtualBox.