How to move Windows to VirtualBox
So you finally got fed up with M$ and decided to try Linux. You set up a dual boot so you could run Windows and Linux and are finding that you like Linux better, and now after discovering VirtualBox you find that Windows runs great under Linux and want to convert you existing Windoze partition to a VDI. Note: If you want to create a VDI from a drive that only has windows on it you can pop the drive into a linux machine as a second hard drive. You can also simply boot a Live Linux CD, but I haven't tried creating a disk image of a drive to the same drive. For obvious reasons this might not work, so you will want to have an external usb drive or multiple partitions/drives so you can save the image to a different drive than the drive you are copying. In linux type:
sudo fdisk -lThis will give you a list of installed hard drives and partitions:
/dev/sda1 * 1 486 3903763+ 82 Linux swap / Solaris /dev/sda4 487 14593 113314477+ f W95 Ext'd (LBA) /dev/sda5 7414 14593 57667648+ 83 Linux /dev/sda6 487 7413 55641064+ 83 LinuxNow we need to make a disk image of the windows drive to your home dir in linux Note: If you are running of a live cd, mount the drive you want to copy to and substitute the mount point for ~/
sudo dd if=/dev/sdb4 of=~/xp.ddNow convert that to a VDI image. Note: You will need to have virtualbox installed for this to work
VBoxManage convertdd ~/xp.dd ~/xp.vdiNow create your new system in VirtualBox using the vdi you just created. Note, you probably want to move the .vdi to your VirtualBox VDI directory first. Enjoy!