These past few days I have been trying (unsuccessfully) to get Windows 7 to run in a virtual machine. My OS is Ubuntu and I need Windows for some things (mainly iTunes), so I decided to virtualise my physical partition so I wouldn’t have to reboot.
After following various guides trying to get VirtualBox to read directly from my physical partition, I had luck with the following command:
VBoxManage internalcommands createrawvmdk -filename Windows.vmdk -rawdisk \\ /dev/sda -partitions 4 -mbr Windowsfull.mbr -relative -register
This is because my Windows partition is /dev/sda4, change yours as you see fit.
I never could get the MBR working, but I had luck with the PLoP boot manager, which was finally able to run the Windows bootloader and get it to boot.
Unfortunately (again), after getting a bit past the spinning balls that form the Windows logo, it gave me a blue screen with the STOP error 0×0000007B, INACCESSABLE_BOOT_DEVICE. I searched high and low for people with the same problem, but either nobody had it, or nobody could solve it.
I figured it had something to do with the boot driver, so I booted in Window and installed the VirtualBox guest additions (I imagine it is the same with VMware Tools), but it still wouldn’t boot.
After Googling the error a bit, I came upon this knowledgebase entry, which instructs me to change the “Start” value to 0 in the following keys:
After doing this, Windows now boots correctly and everything works fine!