Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

What I am thinking about is, that I'd install a linux on a hard drive to boot it normally. In addition to that, I'd create a VM on Windows, that would use the same raw mapped hard drive.

That way I could use my linux normally, and also when I needed some Windows-only program (due to GPU performance limitations can not be run in a VM efficiently) I could fire up the same Linux installation inside Windows, and continue doing my things I left there.

This is something I could, and propably will try out myself, but I decided to gather other peoples experiences first. That way I might know in advance if it is not possible, or if there is something that I should look out for

share|improve this question

2 Answers 2

up vote 2 down vote accepted

You can surely do so, but beware on the drivers issues. Since to the Linux host, the hardware environment is slightly different between virtual hardware and real hardware – typically your real LAN card driver and your virtual LAN card driver – make sure you have both drivers loaded and configured so that they can load dynamically.

Also, consider the GRUB boot loader. You need to configure it so that reads the correct information and behaves correctly. If it is hdisk0's partition 0 that contains Linux in the physical environment, it should still be hdisk0's partition 0 in the virtual environment, and GRUB should be configured to ignore the missing Windows partition when it boot inside the virtual environment.

When the Windows partition is missing, you would find that you lost your dual boot once you start the virtual Linux inside Windows.

But seriously, if you go virtual, why go dual boot? Just use a normal Windows and use Linux virtually – it's good enough for all purposes.

Give Linux raw drive access inside a virtual machine. This already offers the best performance – the only overhead is around 10–15% CPU and around 700–800 MB of RAM for Windows (around 300 MB if you do optimize it) and 20% of network performance if it is a GE link (virtual network can at most run to around 800 MBps), which is not significant in today's hardware.

share|improve this answer
    
The bootloader is a good point. Is it possible to configure grub to use something like disk UUID:s or serials, or do I still have to map like: hd0 -> /dev/sda... –  varesa Apr 26 '13 at 15:32
    
it quite depend on grub version, this article: unix.stackexchange.com/questions/18195/… should give you many idea. in most version, if you can maintain that the hdisk 0 partition 0 the same in both enivronment, and do the same for window, just a 100Mb partition should works, let the grub "feels" the window still there. there should be no problems. while some version can do autodetect pretty well. just run it every time, otherwise you probably need to do reconfigure yourselves everytime. –  Antony Lee Apr 27 '13 at 10:57

It will probably work. I'm currently doing this: my Linux mail server died and I'm now running it inside a VM. I just took the hard drive, installed it in my desktop computer and configured the hypervisor to use it as the 'virtual' disk.

I must precise that the hypervisor I'm using is kvm under linux so I can't give you advices since you're using windows.

Edit: you may have issues with the network interface. Some linux distributions (Debian for example) create a new interface (eth1, eth2 and so on) for each new ethernet MAC address. If you cannot reach the network within your VM this may be a point to check.

share|improve this answer
1  
It should work fine in VirtualBox and VMware Workstation too, from personal experience. I haven't tried in VMware Player. Edit: I did only try it once and for a very short period of time though; take my experience with a grain of salt. –  Rain Apr 26 '13 at 15:02

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.