I have a dual boot machine with Windows 7 and Ubuntu 12.04 LTS. Some time I need Windows 7 during my work. For that I reboot to Windows. It's not a way that I won't access NTFS partition. I need my Windows 7 environment sometime.

Is it possible to boot my Windows 7 partition in virtual machine in Ubuntu 12.04 LTS? That would break me from rebooting. I had heard about Xen and KVM virtual system but don't know how to use.

Any help to use Windows 7 partition on hard disk to boot in virtual box?

  • The same Windows 7 installation that you have now?
    – Mitch
    Aug 11, 2012 at 10:42
  • Yes i have dual boot system. Win7 and ubuntu on single hard disk. I want to use the win7 partition to boot in virtual
    – Amit Rane
    Aug 11, 2012 at 10:44
  • I don't think that is possible. If you need a Windows-environment, you need to login to a windows environment. If there are some applications you need to use, use Wine. Aug 11, 2012 at 10:55
  • I see places that say it is possible with KVM. Has anyone accomplished that?
    – flickerfly
    Sep 30, 2013 at 1:14

2 Answers 2

  • Yes, both Virtualbox and VMWare virtual machines will boot from a physical partition provided they are started with the appropriate permissions (gksudo/sudo).

  • The problem lies with Windows, in that its driver settings, particularly for storage devices, are not portable. Unless you modify the Windows registry to force start storage drivers for both the physical and virtual machines, you will mostly likely end up with a 0x0000007B STOP blue screen error each time which will require a restore or modifying the registry to fix.

See this guide for hints on how to do this and troubleshoot 0x7B errors if you want to try (it discusses physical-to-virtual conversions).

  • So there is no way to boot win7 partition in ubuntu virtualbox still now, due to windows problem :(
    – Amit Rane
    Aug 11, 2012 at 10:55
  • Unless you know how to force drivers on in the Windows registry, not without significant risk of causing your physical Windows to become unbootable... If you are doing this, I recommend installing Windows from the virtual machine first to a partition...
    – ish
    Aug 11, 2012 at 10:57
  • 1
    @AthloX: see edit, added a link which may help. But please backup your Windows first...
    – ish
    Aug 11, 2012 at 11:15
  • Wow now that's thumbs up @izx. I will surely try this on my scrap machine first and let hit this answer as correct if worked
    – Amit Rane
    Aug 11, 2012 at 11:20

If all you are looking to do is be able to use your existing Windows environment underneath Linux, what you are looking to do is best served by cloning your setup and migrating it into a VM. At that point, you resolve any registry issues once and only once (and more simplistically). Rather than dealing with the back and forth of drivers between underneath Linux and bare metal, converting it to a true VM will be as if you moved the Windows environment into a new computer. Windows is much more forgiving about that scenario.

How exactly to do it depends on what solution you want to use. Some links for further reading:

  • Disk2VHD - a guide to migrate the Windows install to a VHD file from inside Windows itself. Says it works with VMWare and Virtual Box.
  • VMWare vSphere Converter - VMWare's conversion tool.
  • VirtualBox Guide - VirtualBox's guide to using their conversion tools.

I'm not aware of any way to get it to work using Xen or KVM, but I could very well be wrong about that. VMWare or VirtualBox are most likely perfectly acceptable solutions, however.

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.