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 have installed Ubuntu on my Windows 7 machine, and can now happily dual-boot.

What I'd like to do is retain this set-up but be able to use the same Ubuntu set-up as a virtual machine within Windows. I've seen solutions that allow this with a Windows VM within Ubuntu, but not the other way around. Can anyone help?

Thanks in advance!

share|improve this question
    
you used to be able to do this both ways around, at least with Windows XP. The trick was to use a feature for Windows that allowed laptops to save several hardware profiles, for example 1 to use when docked, the other to use when not docked. I used to use VmWare Workstation (several years ago), so that I could either boot windows and access linux in a vm, or boot linux, and access my windows in a vm. I'm not sure if windows 7 supports the multiple hardware profiles, though. –  Tim Kennedy Oct 2 '11 at 17:09

1 Answer 1

The exact method depends on the particular VM implementation you're using and details of the hardware and VM configuration. The basic idea is that you simply point the VM configuration at the disk partition where Ubuntu lives.

If Ubuntu was installed into a single partition in a generic PC, that may be all you need to do.

If you used multiple partitions, you may have to boot into some kind of safe or rescue mode and modify /etc/fstab. This would be the case, for instance, if Ubuntu booted natively sees the hard disk as /dev/sda while it appears as /dev/hda under the VM.

Another trap you could run into is configuring the VM to use a disk controller that isn't in the Ubuntu kernel or initrd.

Basically, you've opened a can of worms here. Maybe there are no worms in the can, maybe lots. You won't know how many until you look.

share|improve this answer
    
I've tried this with VMware workstation and it doesn't seem to want to play ball. I look at this link: superuser.com/questions/155533/… but couldn't make that work either. Any more thoughts? –  David Oct 2 '11 at 18:52
    
You've asked a generic question, and I gave you a generic answer. Since long back-and-forth discussions aren't kosher here, I suggest you accept this answer as correct, then post details about the VMware failure in a new question. There's no way this one answer could reasonably cover all possible failures and fixes. There are just too many possibilities; they should be treated separately. –  Warren Young Oct 3 '11 at 3:54

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.