Convert your existing Windows disk to a Virtual Machine

Write tutorials here
There are more tutorials here
Forum rules
Please don't add support questions to tutorials,start your own thread in the appropriate sub-forum instead. Before you post please read this
Post Reply
Level 1
Level 1
Posts: 30
Joined: Fri Jul 01, 2011 9:35 am

Convert your existing Windows disk to a Virtual Machine

Post by Tharkis » Tue Dec 04, 2012 11:37 pm

So you love Linux, but there are just some windows programs that you can’t live without? Apps that refuse all attempts to run under Wine reliably? What’s more, you want to run your existing windows installation inside of Linux? Some would call you crazy, but I found a way!

Behold! This is my tutorial on running your existing windows installation as a Virtualbox virtual machine.

Stuff we need:
Virtualbox: (Or get it from your repository)
Disk2vhd: ... 56415.aspx
Another hard drive or partition to save the vhd to.
Optional: Your Windows CD or iso (Needed if you are dual booting currently to remove the grub bootloader)

Step 1
Delete all the old crap in your downloads folder, the **** and clear out that gigabyte of temporary internet files. (At least move the **** to another drive) Uninstall those programs you never intend to use again. Doing so will make your virtual disk smaller, which is a good thing!

Step 2
Unzip the Disk2vhd to your other partition or hard drive and start it up. Sell your soul in the license agreement. Select the System Reserved and your C:\ volumes. (If you have windows installed to another drive, select that volume instead.)

Step 3
Choose the name of your vhd file and where it will be stored. By default it will be the directory in which the Disk2vhd program is run and the file name will be your system name.

Step 4
Click the create button and wait… Watch some ****.. Do the dishes.. Pick your nose… Learn to play the pan flute…

Step 5
Ok now we have our virtual disk! Throw it in whatever folder you want to store it for safe keeping then let’s boot into Linux (my favorite flavor is Mint).

Step 6
Ahhh home again.. So we need to install virtualbox now if we haven't already and give it a run.
Click the New button and give your new virtual machine a name. Next choose the OS, mine happens to be Windows 7 x64

Give it a couple gigs of memory, or however much you think it might need.

Now we're going to select the vhd we created in windows. Click use existing hard disk, and browse to select it.

Finally click the create button.

Step 8
Now we have to configure our Virtual Machine. Click the settings button and go to the System tab.
Make sure IO APIC is checked on the motherboard tab.

Go to the processor tab and give it another processor if you want. Otherwise, I like to enable PAE/NX.

Finally ensure Enable VT-x /AMD-V and nested paging are enabled on the Accelleration tab.

Click on the Display button, and make sure you set your video memory to 128 and enable 2d acceleration. You can enable 3d acceleration if you wish as well, though it isn't exactly stable.

Ok we're done for now. Click the OK button and let's boot this sucker. Click the start button and watch the magic happen!

Oh noes! It seems I am dual booting. Grub can't find the correct device. Well we could fix it in grub, but this is windows and I don't want no stinkin grub in my windows environment. Let's just shut the VM down.
Go back into the settings and click on the Storage button on the left. Under the IDE controller click on the CD icon that says empty and then click on the little cd icon on the right hand side. You have a choice of loading your physical cd drive or loading an iso. I'm going to select an iso because I'm cool like that.

Now start the vm again and boot off the cd. Since I'm running windows 7 we need to go into the recovery options and select command prompt.
Once in the command prompt you need to do the following command: bootsect /nt60 SYS

This will install the the MBR on the system partition. Alternatively you could use bootsect /nt60 ALL to install it on all partitions if you were unsure.
Now we can boot the image and WOOT it's windows. From there we have to load the Virtualbox guest additions by clicking on Devices and install guest additions. This will load an iso with guest additions which you can browse to install.
Reboot the vm using the start menu and you are good to go.

Sorry about the lack of pictures. I will update it later with screenshots and maybe make it a little clearer.

Post Reply

Return to “Tutorials”