Sysinterals recently released a free P2V. The comparison table below is for your reference to help highlight the difference in features and functionality between the two. The table is not meant to pin one tool against the other (i.e. who is better). The free tool is not meant to compete against VMM P2V. The free tool does however address the following gaps:
1. Support technician that needs to capture a VM from a physical machine for troubleshooting purposes (VMM is not deployed)
2. Customers that do not want deploy VMM just for P2V or pay for another product
3. End-user converting their own desktop to VMs without requiring a server admin
| Features |
VMM P2V |
Sysinternals Disk2vhd |
| Disable services offline after conversion |
Yes |
No |
| Disable drivers offline after conversion |
Yes |
No |
| Offline P2V support (uses WINPE) |
Yes |
No |
| Hardware Re-configuration (e.g. change MAC address on vNIC) |
Yes |
No |
| Automation through scripting |
Yes (POSH) |
No (Command shell) |
| Job progress and job audit |
Yes |
No (can code something in POSH for job progress) |
| Supports remote execution |
Yes |
No |
| Supports no user interaction on source |
Yes |
No |
| Enhanced placement technology to know which host to place the VM workload on |
Yes |
No |
| Carry over network configuration from source NICs (static IP) |
Yes |
No |
| Skip copy of empty space on source to improve transfer time |
Yes |
Yes |
| Uses VSS for online P2V |
Yes |
Yes |
| Supports BITS for transferring files (both online and offline) - secure, re-start |
Yes |
No |
| Support streaming of data between the source and destination |
Yes |
No |
| Support disk size expansion |
Yes |
No |
| Automatically install Integration Services |
Yes |
No |
| Support W2KSP4 |
Yes |
No |
| Support client and server OS - XP, W2K3, Vista, W2K8, Win7, W2K8 R2 |
Yes |
Yes |
| Automatic creation of VM as part of conversion |
Yes |
No |
| Free |
No |
Yes |
| Requires Management Tool (additional infrastructure) |
No |
Yes |
| End-user standalone interface |
No |
Yes |
If you need to quickly recover a VM that has snapshots but no export file, you can use the commands in SCVMM R2 that enable rapid provisioning. In this case you are creating a new VM from the latest AVHD.
NOTE: This approach does not recreate the snapshot tree. This is simply a way of recovering your VM if you need immediate access to it.
To get the latest AVHD:
|
PS C:\>$avhds = get-childitem \\vmhost01\e$\SnapshotRecover01 -Filter "*.avhd" -Recurse | sort-object @{Expression={$_.LastWriteTime-$_.CreationTime}; Ascending=$true} |
The first AVHD in this list should be the latest one. From the object you want to tease apart the location of the AVHD and the file name
|
PS C:\> $avhds[0].directoryname, $avhds[0].name
\\ vmhost01\e$\SnapshotRecover01
SnapshotRecover01_disk_1_37BD309A-C4B3-4196-A698-485B7BADF8AE.avhd
PS C:\> |
Now that you have the Path to the AVHD and the AVHD file name, use SCVMM to create a new VM from the existing disk
|
(1) PS C:\> $guid = [guid]::NewGuid()
(2) PS C:\> $vmhost = Get-VMHost | where {$_.Name -match "vmhost01"}
(3) PS C:\> $vhd = @(Get-VirtualHardDisk | where {$_.Name -Match "large"})
(4) PS C:\> New-VirtualDiskDrive -VirtualHardDisk $vhd[0] -IDE -BUS 0 –LUN 0 -Path "E:\SnapshotRecover01" -Filename "SnapshotRecover01_disk_1_37BD309A-C4B3-4196-A698-485B7BADF8AE.avhd" -JobGroup $guid
(5) PS C:\> New-vm -VMHost $vmhost -Name "SnapshotRecover01_01" -Path "E:\snapshotrecover01" -JobGroup $guid -UseLocalVirtualHardDisks -Description "" -Owner "contoso\user01" -CPUCount 1 -MemoryMB 512 -VMMServer localhost –SkipInstallVirtualizationGuestServices |
Step by step
1. Create a guid that will be used for the jobgroup
2. Get the vm host object where you want to create the vm
3. Get ANY vhd from the library. Doesn’t matter which one. The next cmdlet simply needs a placeholder. Use the blank VHDs that ship with VMM for example. This VHD does NOT need to be the snapshot aVHD!
4. Pass the path to the AVHD and the AVHD file name (retrieved from the host earlier) to New-VirtualDiskDrive. Use the VHD placeholder here. The absolute paths you specify here are from the VM host that contains the AVHD (nothing to do with Library).
5. Call the New-VM cmdlet with –UseLocalVirtualHardDisks parameter. This instructs New-VM to skip the BITS deployment and look for the disks you specified in New-VirtualDiskDrive. Use –SkipInstallVirtualizationGuestServices to avoid installing IC.
Disclaimer: This method is simply a quick way of getting the VM up and running. This method does not allow you to restore snapshot information or save state. There is always risk of using the wrong AVHD, so keep that in mind when you do this.
http://technet.microsoft.com/en-us/library/dd772269.aspx
Includes KMS client setup keys. Useful when creating SCVMM Guest OS profiles.
--snippet--
Manually Activate a KMS Client
By default, KMS clients automatically attempt to activate themselves at preset intervals. To manually activate KMS clients (for example, disconnected clients) before distributing them to users, use the Control Panel System item, or run slmgr.vbs /ato at an elevated command prompt. The Slmgr.vbs script reports activation success or failure and provides a result code. To perform activation, the KMS client must have access to a KMS host on the organization’s network.
Converting MAK Clients to KMS and KMS Clients to MAK
By default, Windows 7 and Windows Server 2008 R2 operating systems use KMS for activation. To change existing KMS clients to MAK clients, simply install a MAK key. Similarly, to change MAK clients to KMS clients, run:
slmgr.vbs /ipk <KmsSetupKey>
where KmsSetupKey is one of the setup keys shown in Table 4. After installing the KMS setup key, activate the KMS client by running cscript slmgr.vbs /ato.
Table 4 KMS Client Setup Keys
|
Operating System Edition |
Product Key |
|
Windows 7 |
|
|
Windows 7 Professional |
FJ82H-XT6CR-J8D7P-XQJJ2-GPDD4 |
|
Windows 7 Professional N |
MRPKT-YTG23-K7D7T-X2JMM-QY7MG |
|
Windows 7 Enterprise |
33PXH-7Y6KF-2VJC9-XBBR8-HVTHH |
|
Windows 7 Enterprise N |
YDRBP-3D83W-TY26F-D46B2-XCKRJ |
|
Windows 7 Enterprise E |
C29WB-22CC8-VJ326-GHFJW-H9DH4 |
|
Windows Server 2008 R2 |
|
|
Windows Server 2008 R2 HPC Edition |
FKJQ8-TMCVP-FRMR7-4WR42-3JCD7 |
|
Windows Server 2008 R2 Datacenter |
74YFP-3QFB3-KQT8W-PMXWJ-7M648 |
|
Windows Server 2008 R2 Enterprise |
489J6-VHDMP-X63PK-3K798-CPX3Y |
|
Windows Server 2008 R2 for Itanium-Based Systems |
GT63C-RJFQ3-4GMB6-BRFB9-CB83V |
|
Windows Server 2008 R2 Standard |
YC6KT-GKW9T-YTKYR-T4X34-R7VHC |
|
Windows Web Server 2008 R2 |
6TPJF-RBVHG-WBW2R-86QPH-6RTM4 |
Many customers ask how they can replicate VMM templates to other Library servers (within a single VMM instance). A template is really a collection of properties stored in the database and pointers to VHDs stored on the Library server (exposed through a share path). Customers with multiple datacenters or regional locations will most probably want local Library servers in every major hub to reduce WAN traffic and avoid paying latency penalty when deploying new VMs from template.
Natively, VMM allows you to copy (clone) an existing template . By default the new template will remain on the same Library server and even though you can change the virtual hard disk through the UI, for very large environments this manual effort is error prone. So the question now, how can a user replicate VHDs and VMM templates to secondary Library Servers programmatically?
NOTE: The information below only applies to Library servers managed by a single VMM instance. Replication of templates between independent VMM instances is not addressed here.
1. You can accomplish this in 2 steps. The first involves using some replication technology (not offered throughVMM)… for example robocopy or DFSR. Cheng Wei, a fellow PM on the VMM team, published a blog post detailing the ins and out of VMM and DFSR (http://blogs.technet.com/chengw/archive/2008/08/26/dfs-on-vmm-library.aspx). The second step is to clone and modify VMM templates using VMM's Powershell CLI.
2. For this example I will assume you have a Library server in NY as the primary and a Library Server in Seattle as secondary.
3. I will use "WindowsServer2003SP2withIIS.vhd" as the virtual hard disk for the template.
4. Copy the VHD to the secondary Library server and refresh the Library share so it can index the file and bring it under management
5. Start by creating your template on the New York primary Library server. Provide all the hardware and guest os profile information necessary, including the virtual disk (i.e. WindowsServer2003SP2withIIS.vhd) stored in the Library. Name the template "W2K3SourceTemplate01"
6. Create a copy/clone of "W2K3SourceTemplate01", leaving all setting default, and name it "W2K3SeattleTemplate02." This step is really fast, keep in mind that the clone is simply creating a new database record for the template with pointers to the VHD.
7. Get the template object "W2K3SeattleTemplate02"
8. Then get the virtual disk drive for the template
9. Remove the virtual disk drive. At this point if you go to the VMM UI and open the properties for the template, the disk should no longer be present
10. Back in Powershell, get the virtual hard disk object, "WindowsServer2003SP2withIIS.vhd", from the Seattle Library Server
11. Create a new virtual disk drive using this VHD and attach it to the Template "W2K3SeattleTemplate02"
12. After the Library servers refresh, the presence of "W2K3SeattleTemplate02" will switch from the primary Library Server to the secondary.
Here is the powershell script I used to go this:
PS C:\> $os = Get-OperatingSystem | where {$_.Name -eq "Windows Server 2003 Standard Edition (32-bit x86)"}
PS C:\> $vhdprimary = Get-VirtualHardDisk | where {$_.Name -eq "WindowsServer2003SP2withIIS.vhd" -and $_.SharePath -eq "\\NYCVMMLibrary.contoso.com\MSSCVMMLibrary\WindowsServer2003SP2withIIS.vhd"}
PS C:\> $templateprimary = New-Template –Name “W2K3SourceTemplate01” –NoCustomization –OperatingSystem $os –VirtualHardDisk $vhdprimary
PS C:\> $templatesecondary = New-Template -Template $templateprimary -Name W2K3SeattleTemplate02
PS C:\> $vddsecondary = @($templatesecondary.VirtualDiskDrives)
PS C:\> Remove-VirtualDiskDrive -VirtualDiskDrive $vddsecondary[0]
PS C:\> $vhdsecondary = Get-VirtualHardDisk | where {$_.Name -eq "WindowsServer2003SP2withIIS.vhd" -and $_.SharePath -eq "\\SEAVMMLibrary.contoso.com\VHDs\WindowsServer2003SP2withIIS.vhd"}
PS C:\> New-VirtualDiskDrive -VirtualHardDisk $vhdsecondary -Template $templatesecondary -IDE -BUS 0 -LUN 0
VMM2008 will block P2V on source machines with an SSL cert registered on 443. To change the default port used by VMM, please follow these precise steps.
1. Go to Regedit->HKLM\Software\Microsoft\Microsoft System Center Virtual Machine Manager Server\Settings
2. Create a new DWORD reg entry named “P2VBITSTcpPort” and give it a decimal value of say 3043 or any other port that is not being used on the host machine.
3. Go to system services (services.msc) and restart Virtual Machine Manager service.
When you perform a V2V from a VMware host and I get the following error:
Error (12709)
The operation on did not complete successfully because of the error: Server sent disconnect message: type 2 (protocol error : too many authentication failures for root)
Enable the SSH login for the root and try again.
Check out the following document for a set of public PIDs that you can use in the OS profile: http://download.microsoft.com/download/4/5/f/45fb677a-c215-442e-afd0-419e08b6c5d1/Volume%20Activation%202.0%20Deployment%20Guide.doc
KMS Client Setup Keys
By default, Windows Vista and Windows Server 2008 operating systems use KMS for activation. You can change the activation method of a KMS client to MAK and then change it back by installing the corresponding product key. Table 2 lists the KMS client setup keys for Windows Vista and Windows Server 2008 volume editions.
Table 2: KMS Client Setup Keys
|
Operating System Edition |
Product Key |
|
Windows Vista Business |
YFKBB-PQJJV-G996G-VWGXY-2V3X8 |
|
Windows Vista Business N |
HMBQG-8H2RH-C77VX-27R82-VMQBT |
|
Windows Vista Enterprise |
VKK3X-68KWM-X2YGT-QR4M6-4BWMV |
|
Windows Vista Enterprise N |
VTC42-BM838-43QHV-84HX6-XJXKV |
|
|
|
Windows Server 2008 Datacenter |
7M67G-PC374-GR742-YH8V4-TCBY3 |
|
Windows Server 2008 Datacenter without Hyper-V |
22XQ2-VRXRG-P8D42-K34TD-G3QQC |
|
Windows Server 2008 for Itanium-Based Systems |
4DWFP-JF3DJ-B7DTH-78FJB-PDRHK |
|
Windows Server 2008 Enterprise |
YQGMW-MPWTJ-34KDK-48M3W-X4Q6V |
|
Windows Server 2008 Enterprise without Hyper-V |
39BXF-X8Q23-P2WWT-38T2F-G3FPG |
|
Windows Server 2008 Standard |
TM24T-X9RMF-VWXK6-X8JC9-BFGM2 |
|
Windows Server 2008 Standard without Hyper-V |
W7VD6-7JFBR-RX26B-YKQ3Y-6FFFJ |
|
Windows Web Server 2008 |
WYR28-R7TFJ-3X2YQ-YCY4H-M249D |
VMM uses Template objects to deploy new VMs from templates stored in the Library. To automate the provisioning of new VMs from templates, VMM can pass the answer file to Windows during sysprep customization/specialization (this is why you create Guest OS profiles). The Guest OS profile is where you specify the Product Key for the OS that it applies to. Keep in mind though, VMM can only validate the syntax of the product key... not if the key is valid for that OS. So if you create a guest OS profile with a syntactically valid product key but invalid for the OS being deployed, you will get the following error during specialization (terminology specific to Vista/Windows Server 2008):

To correct this, simply update the product key in the guest OS profile and deploy.
VMM 2008 automates the uninstall of Virtual Server VM Additions (version 13.813+) and installation Hyper-V Integration Components with no user interaction. Two ways to take advantage of this feature - 1) If you have a VM that was running under Virtual Server and you manually migrated it to Hyper-V, VMM will refresh that VM into the console. At that point you can right click on it an select 'Install Virtual Guest Services' (NOTE: VMM uses this terminology to refer to VM Additions and Integration Components. This is not VMM specific software). 2) If you have an existing Virtual Server VM managed by VMM2008 and you decide to migrate it to Hyper-V.
- Please take note that if you select action "Install Virtual Guest Services" on a running VM, the VM remains shutdown after installing Virtual Guest Services – as the dialogs warn, VM will be stopped before proceeding with the install of Virtual Guest Services. VM in an OFF state is the starting power state of the VM when Virtual Guest Services gets installed and is the ending state
- Shutdown vs. Stop – The typical use case for installing virtual guest services from the VMM console is when the VM does NOT include VM Additions/IC. In this case, we have no choice but to stop the VM. This is the same behavior with Hyper-V console. This part is by design.
-
When migrating a VHD that was on Virtual Server to Hyper-V, VMM needs to orchestrate several steps:
Uninstall VM Additions
This requires a reboot
Install Integration Component
At this point the Integration Components Installer will replace the HAL of the VM which requires a reboot
Install Integration Components continues
This requires a reboot upon completion
VMM has to check that IC were properly installed
This will finally shutdown the VM
Virtual Guest Services install/upgrade job is complete at this point

When creating a new VM from scratch with a blank VHD or a VHD with a non-Windows OS, you will get the warning (VMM does peak inside the VHD as part of the creation process to determine this). This warning can be ignored. To have the VM autostart after completion, make sure the ‘Start the VM after deploying…’ checkbox is check at the end of the wizard:
When creating a new VM from template, and that template contains a blank VHD or a non-Windows OS or a Windows OS that has not been generalized (i.e. the OS is not sysprepped), then the job will fail because VMM expects a VM from template to go through the sysprep customization process (hence why we ask for an OS profile). VMM will crack open the VHD and check of the OS is in a sysprep state. If not, then the job will fail. To create a proper template, you can use an existing Vm with a running Windows OS (right click on it and select New Template… this will kick off sysprep in the OS and then store the VM to Library as template… this removes the original VM). Or… if you already have VHDs that have been sysprepped, simply import them to the Library and then when you create a new template… attach that VHD instead of the blank one. Last… you can create a new template that does not require a sysprepped OS by selecting ‘Customization Not Required’ from the Guest OS profile dropdown:
Keep in mind that of the VHD is blank or contains a non-Windows OS, it will complete with the same warning.
Below are the job views to confirm that we are on the same page
New VM from blank VHD (warning)

New VM from template from a blank VHD (error)

New Vm from template from blank VHD with ‘Customization Not Required’ (warning)
VMM has a new cmdlet to get the next available MAC from the static pool: New-PhysicalAddress. When creating a VM, the calling script can first see the next MAC that available in the static pool and then commit it as part of the provisioning process.
First you will need to setup a static MAC range in Global Settings.
To see the next available MAC without committing it:
PS C:\> $mac1 = New-PhysicalAddress
PS C:\> $mac1
00:00:01:00:00:01
To get the next available MAC and commit it so no one else can use it (once a MAC address is committed, it will never get recycled):
PS C:\> $mac1 = New-PhysicalAddress -Commit
PS C:\> $mac1
00:00:01:00:00:01
To see the next available MAC without committing it:
PS C:\> $mac2 = New-PhysicalAddress
PS C:\> $mac2
00:00:01:00:00:02
PS C:\>