My Old IIS.NET BlogTechNet Magazine Articles Learn about IIS7 from a book I wrote a few years back!
In the past two posts, I’ve focused on the first two capabilities provided in the Configuration Manager Physical-to-Virtual Migration Toolkit. The primary scenario for this toolkit is to offer customers the ability to virtualize their physical servers when they don’t readily have System Center Virtual Machine Manager available. As mentioned, our P0 scenario was to ensure that users could do this virtualization without requiring any additional hardware. Beyond this, the goal was to ensure that at completion the end-user would utilize the same server for their hosting of the newly created VHD.
In today’s post, I will talk about a second feature available to users of the P2V toolkit – ability to virtualize without harming the physical server. This feature allows administrators to essentially clone the entire disk and does so offline to ensure the integrity of the image. This is done using a feature we called “Windows PE Creator”. This feature got it’s name through the fact that we utilize Windows PE to boot into Windows and virtualize the disk(s).
The first step is to obtain either a USB flash drive or to use CD/DVD media as this is required to create the bootable media. Beyond this, the process is fairly simple overall. Let’s step through it…
To create a non-task sequence based bootable media, select from the action pad the following option-
This will launch the Windows PC creator wizard that will aid you in creating bootable media that includes all the tools needed to successfully virtualize your physical server.
To create your bootable media, do the following:
When it is completed, remove your media and let’s talk about how to utilize what you just created.
The next step is to utilize the USB/DVD you created and push that to your server/client. After adding it, you will be able to boot and will see the Windows loader as we use the Windows 7 WAIK tool ISOBURN.exe to create the burn. This bootable image will automatically load the VHDCaptureWizard.exe (will talk about more in a later post) that allows you to select your drives to virtualize, the path to store the VHD, and actually create the disk.
Prior to starting, here is the information you will need to know:
NOTE: You cannot create the VHD to the same location as the drive you virtualizing (duh!)
The first screen is simply a welcome screen sharing what we are about to do with the virtualization process.
In this screen, you are asked to select the volume, or volumes you’d like us to virtualize. You can select a minimal of one disk or multiple disks. You will not need to provide us disk names, instead, we automatically create them in order as disk0.vhd, disk1.vhd, etc.
The last screen asks you to select the location to create the VHD and then, after clicking Next, the convert process will start. This will provide you a status of the Bytes copied, the total Bytes, and then a progress bar as the creation is occuring. After this convert process is completed, the VHD file is now available to you to use.
That’s it. When completed the actual results are a VHD that emulates the physical drive that is Hyper-V ready.
NOTE: The physical disks volumes cannot be larger than 2 TB as this isn’t supported by Hyper-V in Windows Server 2008/R2. Beyond this, the volumes should be MBR-based and not GPT as we currently do not support GPT disks.
In today’s post, I focused on an additional scenario that comes about when you would like to virtualize your server/client though the server is unable to re-host using Hyper-V. This is common for older servers that don’t have the requirements necessary.
Using the ConfigMgr P2V Migration Toolkit’s Windows PE creator, we automate the ability to create a offline copy of your VHD so that you can host it on Hyper-V. This is useful for moving legacy systems to a Windows Hyper-V server that is hosted elsewhere. All you have to do is provide us the volumes, the location to create the VHDs, and you are set!
Great post Chris! I have a few additions that may save others some time...
First, the prerequisites for the P2V Toolkit include the System Center Configuration Manager 2007 console. If you don't have that install already get a trial from the Microsoft Downloads (1.3GB).
The trial is an .exe you can unpack first to run the setup (.hta).
The SCCM 2007 console needs to be installed on a domain joined PC.
The Windows 7 AIK is a 1.7Gb download and it is easiest to mount the ISO (but you can burn it to DVD if you want). I use SlySoft Virtual CloneDrive (small download, very stable).
Best use Win7 x64 or 2008 R2 to install the P2V Toolkit, just sayin'. To directly create a bootable WinPE USB or CD/DVD install everything on a physical machine.
If you need additional (disk, network) drivers (esp. RAID controllers) injected into the WinPE P2V image, use DISM (from the AIK).
It took me a little time to figure out that the "P2V Migration Toolkit" wizard used the 'default' AIK W.wim image (and not the one in "WinPE Files" under its installation folder).
To update drivers in the winpe.wim image using DISM:
- Download the drivers you need from the OEM's
- Unpack them to a folder (say c:\temp\drivers).
Use subfolders if you need to load more than one driver/package.
- Create a folder for mounting the .wim (i.e. c:\temp\mount)
- Start the "Deployment Tools Command Prompt" in elevated mode from the AIK.
- Use DISM to update the image:
a. dism /Mount-WIM /WimFile:[wim full path] /index:1 /MountDir:[mount dir]
b. dism /image:[mount dir] /Add-Driver /Driver:[driver path] /recurse
c. dism /unmount-wim /Mountdir:[mount dir] /commit
Replace the paths between  with those appropriate for your installation.
After updating the .wim with the drivers you can start the wizard to create the bootable P2V media.
Note that in the "Confirm the settings" screen of the wizard, right before you click the "Create" button, it lists the "WinPE image build temp directory". Copy that location if you want to save the files "for later use". It will also contain the .iso you can seperately burn to CD/DVD should the integrated burn fail (for any reason).
Image creation in a simple enviroment goes at about 45MB/s (or 160GB/hour), but YMMV.
Running the vhdprep on a 230GB disk image only took a few minutes im my environment.
There you go. Failsafe offline P2V image creation.
Make sure the first thing you do when you start a VM with a P2V-ed disk is that you run the Integration Components setup.
P.S. When you add the newly created .vhd to a VM, you will probably have some old "hardware" still "in" Windows but those will no longer be present and, especially NIC's, will cause you errors.
Clean up old hardware by:
- Open an (elevated) command prompt (in the VM)
- Type: set devmgr_show_nonpresent_devices=1
- Type: devmgmt.msc
- In Device Manager enable View Hidden Devices in the View menu