Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I want to boot the Windows which is installed in laptop's internal harddisk(/dev/sda1) from the VirtualBox installed in my Ubuntu. Can somebody tell me how to do this in VirtualBox.

share|improve this question
    
I'd be very suprised if that is possible. Then again, I like nice surprises. –  Psirus Feb 9 '12 at 9:57
    
See: serverfault.com/questions/2655/… –  Mat Feb 9 '12 at 10:11

4 Answers 4

up vote 6 down vote accepted

You can not directly run the Windows installed physically on a harddisk partition or on a different disk.

However, you can migrate the Windows installed on your physical computer to a VirtualBox virtual machine. I can not easily summarize the procedure because it is a little bit complicated, so yo can read the official documentation here: https://www.virtualbox.org/wiki/Migrate_Windows

share|improve this answer
1  
-1: it is not true. –  enzotib Feb 9 '12 at 11:37
    
@enzotib The OS inside VirtualBox can access the host's partition. The difficulty is running Windows on hardware that's not what you installed it on. –  Gilles Feb 9 '12 at 22:52

It can be done, but it is not recommended if you don't really know what you are doing:

Warning

Raw hard disk access is for expert users only. Incorrect use or use of an outdated configuration can lead to total loss of data on the physical disk. Most importantly, do not attempt to boot the partition with the currently running host operating system in a guest. This will lead to severe data corruption.

Anyway, you should look into VirtualBox documentation, in particular in Advanced storage configuration::Using a raw host hard disk from a guest.

share|improve this answer
    
Interesting, didn't know about that. –  Patkos Csaba Feb 9 '12 at 11:48
    
The "Advanced" section got smaller after Oracle bought Sun. :-( But anyway - if you do so - run in "repair" mode to substitute the drivers with working versions. –  Nils Feb 9 '12 at 21:30
    
I know this isn't the right site for this, but do you have experience taking a Windows installation performed on the metal and running it in a VM? –  Gilles Feb 9 '12 at 22:53
    
@Gilles: not a direct one, but I've seen it done by a co-worker. –  enzotib Feb 10 '12 at 13:55

It can be done. I actually reinstall Windows on my hdd from VirtualBox while running Linux and then I am able to boot it normally.
Be careful though, mount your Windows partitions on Linux as READ ONLY so you don't mess things by trying to modify files from the 2 OS-es at the same time.

Here are two useful links:

https://forums.virtualbox.org/viewtopic.php?t=33356

http://www.rajatarya.com/website/taming-windows-virtualbox-vm

share|improve this answer

Create extra hardware profile on Windows an use that when booting it from the VM (with raw disk access)

It would help if the VM configuration is similar to the physical hardware...

Some dangers:

  • You should unmount the Windows disk before booting (as a minimum, rwmount it read-only)
  • You should not access the running OS's partitions from within the VM...

MS removed the option to choose a hardware profile when booting in Windows Vista though, so you might be limited to Windows XP or earlier... (unless you can get almost identical hardware to the VM configuration)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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