Is it possible to run a Windows partition as a VM?

All we need is an easy explanation of the problem, so here it is.

My laptop is setup as dual boot between Windows 7 (64-bit) and Ubuntu Linux (64-bit). Because I spend most of my work time in Linux I need a Windows 7 VM to be able to use Microsoft Office tools, etc. But my laptop only has a 256 GB SSD so having a Windows 7 bootable partition and a VM takes up quite a lot of space.

Is there any way of running the Windows 7 partition as a VM from Linux without converting it to an .IMG file, ideally with KVM? If no, are there any other options that could help me?

How to solve :

I know you bored from this bug, So we are here to help you! Take a deep breath and look at the explanation of your problem. We have many solutions to this problem, But we recommend you to use the first method because it is tested & true method that will 100% work for you.

Method 1

I have a fair bit of experience switching between booting a Windows partition natively and running it as a VM. First of all, hardware and driver support were NOT an issue for me, nor was it necessary to uninstall VMware Tools when booting in a physical context.

That aside, it sounds like a great idea, but product activation is where it really falls down. One is not supposed to have to reactivate Windows every time Windows switches between P and V, but it is not foolproof. Windows and Office both will occasionally ask to be re-activated due to alleged hardware changes. Once, after switching between physical and virtual modes, my properly licensed installation of Windows 7 deactivated itself with a bit of fanfare due to an alleged “activation exploit.” These issues would be avoided, or at least rendered trivial, if they occurred in a KMS environment.

When I upgraded to a 300GB SSD, I brought my Windows partition over as a VMDK and never booted it natively again. Windows 7 seems to perform better virtualized on an SSD than natively on an HDD, and the sparse image that I use now consumes less disk space than the old partition.

Executive Summary: Yes, it can be done; drivers are less of a problem than you expect, and Windows activation is more of a problem than you expect. If you don’t really need to run Windows on bare metal, I’d suggest converting your partition to a VHD or VMDK and running it only as a VM.

Method 2

I don’t have any experience with KVM myself, but for VirtualBox, VMWare and Parallels this will work.

It takes several reboots of the W7 VM to recognize the new (virtual) hardware and you will have to install the Guest Additons/VMWare Tools/device drivers, whatever your virtualization software calls it.

Be warned that switching back to using the partition “natively” may not be possible anymore after you have used the partition in a VM.

Even if you can go back it will again take several reboots to recognize the new hardware and you will probably have to de-install the virtualization software in the VM.

I strongly recommend you make a full (image) backup of your laptop before you start experimenting with this.

Method 3

You might try a sparse image file. These are .IMG files of a fixed size that don’t take up space on your disk until they actually contain data.

See http://blog.allanglesit.com/2011/03/linux-kvm-managing-disk-images/

Edit: after re-reading your post I see that your question is very much like How can I run an existing WinXP partition (dual boot machine) inside KVM?

Note: Use and implement method 1 because this method fully tested our system.
Thank you 🙂

All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply