Recently, I needed to convert my physical laptop into a Virtual Machine. Indeed, I’ve received a new Laptop loaded with Operating System and Applications. That was time for me to transfer my data from the old machine to the new one. I did that and didn’t encounter any major issues. However, I wanted to keep for some time the “old” machine configuration (just in case I forget something on it). Best Option was to convert the machine into a virtual machine.
In order to create this virtual machine, I decided to give a try on the Disk2VHD 1.5 utility from sysInternal. The tool is using the snapshot technology available within the Windows Operating system to capture online a image of your running Operating system.
Note : Another option would be to boot into winpe an take an image of your current Operating system (a *.wim image). Within your virtual machine, you could apply the *.wim image and try to boot. The risk is that the machine won’t boot because of some drivers issues.
Converting Physical 2 Virtual
The utility is quite easy to use even if they are some pitfalls :-)) To do your P2V conversion, perform the following actions
Step 1 : Download the utility from Disk2VHD 1.5 utility from sysInternal.
Step 2 : Double-click on the exe file
Step 3 : Accept the License agreement
Step 4 : You will then be presented with the following window on Windows XP or Windows 2003 machines
This is what you get on a Windows 2008/VISTA/Windows 7 Operating system
If you look the screenshots above, they are really similar. The main difference is the option “Fix up HAL for Virtual PC”. You should alway tick up this option when converting a Windows XP or Windows 2003 machine otherwise you might end up with a non bootable system.
Attach VHD or create Virtual Machines
Windows 7/windows 2008 R2 provides the ability to boot from VHD disks. You can also attach the VHD from the disk manager console and get access to the data located inside the VHD
The other option is simpy to create a virtual machine (using Virtual PC 2007 or Windows Virtual PC) and attach the disk to the virtual machine
Notes and limitations
If the disk size (of the physical machine) is bigger than 127 GB, you will not be able to use your P2V VHD file with VirtualPC. (see pt 4 for a workaround)
Do not attach the vhd file on the system where you have created it if you plan to boot from it (on windows 7/windows 2008). If you do this, the BCD will not be able to locate the boot disk
If you boot your virtual machine and you get a message “error disk not found” (or something similar), you might need to mark a partition as active. Boot from WinPE, in the command prompt, type diskpart, then sel partition x (the partition that should be set as active) and then type active. reboot your machine and this should fix the problem
You can use the utility VHDReziser in order to reduce the size of the VHD. This will create a smaller VHD disk that will be useable with Virtual PC (see here for more info)
All in all, the utility can be handy in several situation :
You need to perform a quick backup
You want to consolidate some old machines and make them virtual,
you want to be able to reproduce a problem present on customer location, convert the faulty machine/environment into a virtual infrastructure and investigate
you want to go virtual and do not want to spend too much money on expensive tools and software solution
Give it a try and let me know if you will consider adding this utility into your admin toolkit
Till next time