Virtualizing your PC so you can rebuild it (but still have a running copy of old setup).

I have been in several cases where i really want to rebuild my laptop (because its a complete mess), but don’t want to lose the way its setup.

I do a bit of development with Visual Studio, and invariably find I’ve had to download all sorts of SDKs and run-times and things to get projects working. I just know that if i copy the code to another build of Windows and open and run, there will be all sorts of things it relies on that i have completely forgotten i had to install to get working in the first place.

There’s also a number of other reasons i may want to go back to my pre-rebuild laptop setup if i cant get something working on the new build, or if i cant find something.

So, I decided to see if i could ‘virtualize’ (P2V) my current laptop setup and run it on Hyper-V if i need to get in to it (on top of my newly built Win 10). Run the VM from an external HDD.. yes not the fastest, but there if i need to gun up things as they were on my previous messy Windows setup and get what i need..

So i started looking for an up to date guide. I found this one on Veeams site. Its really good, and it works.

Thanks to whoever wrote the process.

Also needed to get my data drive of (250gb) over to the new image too so when i start the VM up, it has its E: as it was before so things all work. I followed this guide to create the E drive VHDX file so i could attach it. Its also a good time to get all my data and have another copy of it in this VHDX file.

Here is the process i went through to do this successfully.

Downloaded Disk2VHD

Extracted and Ran. Un-ticked the D drive (HP Recovery) and E: Drive (all my data to make the image as small as i could).
Plugged in an external drive (F) and created the VHDX of my bootable laptop on there.
Used these settings:

The cool thing is you can keep using Windows while it creates the image. I definitely wouldn’t be creating any new docs during the process, but i could still browse the web etc. Process took approx 2 hours and created a 194gb VHDX file (the C drive was using around 200 or 230gb).

II then repeated the process and chose just my data drive and created another VHDX file (E_Drive) – took another hour or so for 200gb ish.

On a completely different PC running Hyper-V, i plugged in the drive with my 2 VHDX files of my C Drive (and system resevered etc) and my E Drive.

I created a new VM on that machine. I browsed and attached the C drive and E drive, gave the box 8gb RAM and 4 cores and turned it on. Boom – theres my laptop running in a VM.

First time starting up, Windows took a while to rejig things and i saw this come up, but eventually i was presented with desktop to login.

I had the luxury of testing it all worked on another machine before going through the process of blitzing my laptop and starting again with a clean Windows Installation. STRONGLY suggest you do the same and not just assume this process will work for you. Once you nuke your laptop, its too late to go back.

I plan to have the VM setup in Hyper-V on the new Win 10 build so i can just plug in HDD and power on if i need it, but i have it working on this other Hyper-V server i have worst case scenario.