I have been having difficulty running Windows 7 from the physical disk in VirtualBox on Ubuntu 14.04 LTS.

Installed VirtualBox using the Software Center, and created a Windows 7 VM and empty virtual disk, as a test.

Tried to start the VM and VirtualBox complained about a driver version mismatch. Since the version of VirtualBox was not the latest, I downloaded the latest (from here) and installed it.

After a few attempts to start VirtualBox and the VM, VirtualBox was complaining that another version was running. Thinking I'd start anew, I restarted the host Ubuntu machine.

A GTK error message appeared, and my autostart windows had no decorations. Following this answer to How do I reset my Unity configuration?, I have recovered the desktop.

So, the question is, how to run Windows 7 from a real disk in VirtualBox?


The remainder of this answer is a log of what worked for me.

I re-installed VirtualBox, and following advice here and Access to individual physical hard disk partitions I created a VDMK file to access the Windows 7 partition.

Tried to create a VM (more than once) and got permission errors. The VBoxManage command created the VMDK as root, so I changed the file owner to my uid. The next permission error was that the my uid didn't have access to /dev/sda. Fixed by adding my uid to the disk group.

Finally the VM started! But grub complained

error: unknown filesystem.  
grub rescue>

as in Grub rescue - error: unknown filesystem.

Since making a mistake with grub can be disastrous, I built a new VMDK file to access the whole disk (all on one line):

VBoxManage internalcommands createrawvmdk -filename /home/myuid/mydid/Wholedisk.vmdk -rawdisk /dev/sda

Voilà! The VM started, the grub menu showed, I selected Windows7, and it started.

I think I still have to change grub, so that the default is now Windows 7, otherwise it will try to start Ubuntu, and I'll have two copies of Ubuntu modifying my HD.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.