Can I virtualize a pre-installed Windows 7?

6,227

Solution 1

There is a section in the VirtualBox User Manual explaining how to use a real disk or partition in a virtual machine.

I tried once, and it works. The only problem I had was the video card driver: when switching from the real installation to the virtual one and back, I have to disable/enable the GuestAdditions video card driver, if i recall well (it was long time ago).

Solution 2

I have setup KVM (the default virtualization software for ubuntu) to bring up a windows partition that I can alternately dual boot into.

Sadly, its not an awesome solution, as there are a few gotchas.

  • It wasn't trivial to setup, I had to manually modify some partition permissions and such (but there are some decent articles on this you can google for)
  • As it only works with disks and not partitions, I had to use my main disk virtually. So when it started up, I got the multi-boot GRUB menu, as if I was starting up the machine. If I were to select the same OS in the virtual instance that I was running in the physical instance, it could cause serious problems with two OSes trying to mount the same partition.
  • You need to have free space on your drive to do any of this (to even dual boot). Usually pre-installed windows instances don't leave any space for a 2nd OS, so you'd have to re-size or something just to get dual booting.

Moral of the story: its possible, but I haven't found an easy, error free way to get it working.

Share:
6,227

Related videos on Youtube

SpashHit
Author by

SpashHit

Updated on September 17, 2022

Comments

  • SpashHit
    SpashHit over 1 year

    I am considering buying a new computer with Windows 7 (64-bit) pre-installed. Would it be possible to install Ubuntu (preferably 64-bit) dual-boot on such a machine, and then, using VirtualBox / VMWare, etc. under Ubuntu, make a virtual machine that "points to" the existing Windows 7 OS (without making a copy of it)?

    Just to be clear... at the end of this process:

    • I would have a machine that dual-booted both Windows 7 (64-bit) and Ubuntu (64-bit).

    • If I choose to boot Ubuntu, I would then have the possibility of running a visualization of Windows 7 within Ubuntu.

    • There would only be 1 copy of Windows 7 on the hard disk.

  • Mussnoon
    Mussnoon over 13 years
    I have upgraded major hardware (mainboard, processor, ram, video card) on Windows before (on XP) with no issues whatsoever.
  • Mussnoon
    Mussnoon over 13 years
    As well as move a virtual machine from VirtualPC on Windows to Virtualbox on Ubuntu - which surely use different virtual hardware.
  • SpashHit
    SpashHit over 13 years
    Was it Windows 7 64-bit?
  • luri
    luri over 13 years
    You might be right. My experience migrating a whole Win XP to another PC was a disaster (I have to say they were completely different PC's, with different architecture). But it was quite long ago, so maybe Windows has become smarter in that sense. Anyway, when booting preinstalled W7 (non.virtualized, I mean), the OS will try to use again the real hardware... that's why I said something might get messed up.... Maybe it doesn't. There's yet another issue: activation problems. It has been reported that Windows asks for activation when migrating from one VM to another. Other software will, too.
  • Meghna Natraj
    Meghna Natraj over 10 years
    it would be very helpful for newbies if you post the link of the section.
  • enzotib
    enzotib over 10 years
    @Dilawar: see section "9.8 Advanced storage configuration" of /usr/share/doc/virtualbox/UserManual.pdf.
  • Meghna Natraj
    Meghna Natraj over 10 years
    Thanks, I found a html version. virtualbox.org/manual/ch09.html#idp59191248