Howto boot directly into a VirtualBox image?

Solution 1:

I don't know if it is possible to boot a vdi file but you can convert VDI file to raw image:

VBoxManage internalcommands converttoraw Fedora14.vdi Fedora14.raw

You must remember though that this is a whole drive image, so just copying it to a empty partition won't work, you can copy using Windows version of dd to a spare disk and boot that.

If your Fedora installation is using only one partition you could skip those first sectors containing MBR and copy only the remaining stuff. This will be easily bootable using either Fedora CD or Super GRUB Disk.

All in all, I think that this is a good exercise but rather pointless. Installing Fedora natively and copying data from /home from VM (if you didn't use MySQL or other databases in the VM that's the only thing you need to copy) will be much easier and less error prone.

Solution 2:

It is possible to boot directly into Virtual PC/Hyper-V VHD files on a Windows 7 machine, but that works because Windows 7 can mount VHDs like they're physical disks. I'm not sure it would be possible using VDI, so you'd either need to convert the virtual machine to a VHD format or follow Hubert's suggestion above.

Scott Hanselman has a good article on Boot-to-VHD in Windows 7.