P2V easy as ABC (with Hyper-V)

Having discovered just how easy it is to deploy a DaaS server setup, thanks for Server 2012’s RDS Roles, the next big issue is the putting meat on the bones. In that the creation of Virtual machines for the broker server to work with.

When I completed the pet project, I basically started from the ground up. In that the VM’s were created from scratch, and just the additional required apps were added. But what if you need to virtualise an existing system ?

Luckily, there’s a dead handy application, available from Microsoft that allows you to convert both physical and existing virtuals to virtual disks, that a Hyper V server can utilise.

Say hello to the sysadmin’s new friend in VM construction for HyperV disk2vhd.exe


Converting Physical to Virtual machines under Hyper V

Having migrated manually physical servers into virtual hosting on the cloud, the task can be a long and laborious one, ensuring that the initial configuration is right, then applying the applications and data, then looking at the security on top.

The ability to convert a system and just drop it onto the virtual hosting is a god send to say the least. In this article I’m focusing on virtualizing PC’s as VM for RDS, as a follow on to the RDS article, but the following exact same procedure can be used for servers too, just add a little more disk space for storage and a hint more time to prep the VM disk. 

What shouldn’t you virtualize

Hyper V has a “limit” of 127GB, so anything larger than that is a no- no I’m afraid. Also certain server roles such as a domain controller, are better suited to being built from scratch and then let the new server synch with the main DC, rather than duplicate and let the ensuing chaos of sync to matched servers battle it out.

 Obtain the Utility

The application is available from the Windows Sysinternals page so that you can download the program utility. The facility also existed to run the utility from the web page at the time of writing, so if you have a fast internet connection and cloud storage you can run the utility from the cloud.


Using disk2vhd.exe

The utility is downloaded as a zip file. You need extract the utility on the machine that you wish to convert from Physical to Virtual.

Tip always check the Use Vhdx box to create the disk this newer new disk format that was introduced in Windows Server 2012. Compared to traditional VHD, VHDX has several improvements, including a special internal log to reduce the chances of data corruption, a bigger capacity (up to 64 TB) and other great features. It’s worth using!

The Filename allows a path to store the virtual hard disk you’re going to create, its much betters to create the virtual disk on a separate disk to that of what you’re virtualizing (avoid the black hols scenario and copying the copy you’re creating!). Remember to include any disk/volume you want to virtualize. If you want it to be a bootable disk, then include a system disk plus boot area (tick System Reserved label). Click Create to start the process.


 Convert disk(s) to VHDX format and copy it to Hyper-V host

Once the conversion is running, you’ll see the estimated time of its completion, displayed:-


This screen shot shows the VM being copied to a new local drive, but as said you can copy to accessible server drives, or the cloud if required

As a result of the operation, you’ll get a VHDX file/disk, which you can now copy to your Hyper-V server and place in the folder where you have the VM disks.


 Create a new VM on a Hyper-V host

Having created your disk, you should create a VM first. Run the New Virtual Machine wizard in Hyper-V Manager and configure it according to your needs. Configuration options are straight forward



NOTE: Choose your VM generation carefully. Starting with Windows 2012 R2, Hyper-V has a new option:

Generation 2 Virtual machines. This is a second generation firmware for VMs is a revised set of virtual hardware and new opportunities for users, such as a boot from an SCSI device. There’s limitations in that only newer machines Windows 8 + are gen2 compliant, so if you’re virtualizing older machines take care in your choice. Gen 2 really is best suited to 64 bit builds, I’ve used them for Windows 10 and 2012 Server VM’s for which they’re fine, if you’re not 100% sure stick to Generation 1.


Connecting up the vdhx disk

 While creating the virtual machine you also have to configure the virtual hard disk, so then pick a disk you already have created with the utility and complete the rest of the steps in the wizard.



After completing the wizard you should be able to run the VM , simply by right-click on a VM, select Run, then right-click again and connect to it.

If the hardware configuration of the VM is different to the one being run on the VM host it may take some time for the VM to boot up. However, in a few minutes you’ll see the welcome screen and be ready to log in to the system. Presto as simple as that




Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s