Physical to Virtual (P2V) Guide Using System Center Virtual Machine Manager 2012 SP1

This guide demonstrates how to virtualize a physical machine running Windows. It requires a VMM server managing at least one Hyper-V host available for placement. The physical machine must be connected to the same network as the Hyper-V host and the VMM server for successful conversion. Additionally, local or domain administrative credentials are required. The process is initiated from the VMM console and is completed using the wizard. Powershell script included.

Select Convert Physical Machine from the Create Virtual Machine dropdown menu in VMM.

clip_image002

Specify the computer you wish to virtualize, providing valid credentials with appropriate privilege.

clip_image004

Name the virtual machine that will be created as the container of the virtualized physical machine. This does not have to match the hostname of the computer. Provide a description if desired.

clip_image006

Scan the system (by clicking Scan System).

clip_image008

Review the scan results and proceed if details appear as expected. Take note of network adapters for setting up VM networks later in the wizard.

clip_image010

Configure the volumes to be converted to VHDs. Note that system volumes are mandatory.

clip_image012

Verify the VM Configuration – Number of processors and Memory. These default values will reflect the physical system’s configuration and may be changed based on current needs. For example, if a system is under P2V as a cheaper alternative to a memory upgrade, you may increase the memory here if it is available. It would not be advised to choose a lower value here to ensure functionality of the virtualized system as close to the original physical machine as possible.

clip_image014

Choose a server for placement with at least a 1-star rating. A zero-star rating indicates an incompatible system configuration such as invalid network configuration, insufficient memory, host not responding, or other similar problems.

clip_image016

Choose the placement location. This is the path on the target server, where the VM will reside.

clip_image018

Configure the network configuration to match the existing machine. If you are performing P2V for testing or backup, it may be advisable to leave the connections as Not connected to prevent accidental access to the newly created VM in place of the existing physical machine.

clip_image020

Choose the Automatic actions for this VM. Generally, “Automatically turn on the virtual machine if it was running when the physical server stopped” should be chosen here. It is not the default option.

clip_image022

Correct any issues detected by the wizard, if any, and click Check Again until “No issues detected.” Information is shown in the window.

clip_image024

Review the summary and click Create to start the conversion process. It may not be wise to start the virtual machine after deploying it since your physical machine will continue to run.

clip_image026

Check the Jobs section of VMM for detailed progress information

clip_image028

Read on to see how to do the same thing in Powershell.

<!––nextpage––>

This entire process can also be completed using the following Powershell template:

$Credential = get-credential

New-SCComputerConfiguration -VMMServer localhost -SourceComputerName “IIS1” -Credential $Credential

$VMHost = Get-SCVMHost -VMMServer localhost | where {$_.Name -eq “HYPERV2012.DALARIS.LOCAL”}

$ComputerConfiguration = Get-SCComputerConfiguration -VMMServer localhost | where {$_.Name -eq “IIS1”}

New-SCP2V -VMMServer localhost -VMHost $VMHost -RunAsynchronously -JobGroup 7801807d-deee-4cc1-9354-3f06af46a5f7 -SourceNetworkConnectionID “00:11:43:DF:DA:2F” -MACAddress “00:11:43:DF:DA:2F” -MACAddressType Static -NoConnection -ComputerConfiguration $ComputerConfiguration

$VMHost = Get-SCVMHost -VMMServer localhost | where {$_.Name -eq “HYPERV2012.DALARIS.LOCAL”}

$ComputerConfiguration = Get-SCComputerConfiguration -VMMServer localhost | where {$_.Name -eq “IIS1”}

New-SCP2V -VMMServer localhost -VMHost $VMHost -RunAsynchronously -JobGroup 7801807d-deee-4cc1-9354-3f06af46a5f7 -SourceNetworkConnectionID “00:11:43:DF:DA:30” -MACAddress “00:11:43:DF:DA:30” -MACAddressType Static -NoConnection -ComputerConfiguration $ComputerConfiguration

$VMHost = Get-SCVMHost -VMMServer localhost | where {$_.Name -eq “HYPERV2012.DALARIS.LOCAL”}

$ComputerConfiguration = Get-SCComputerConfiguration -VMMServer localhost | where {$_.Name -eq “IIS1”}

New-SCP2V -VMMServer localhost -VMHost $VMHost -RunAsynchronously -JobGroup 7801807d-deee-4cc1-9354-3f06af46a5f7 -VolumeDeviceID “\\?\Volume{b3f04939-0c4d-11df-8f18-806e6f6e6963}\” -Dynamic -IDE -Bus 0 -LUN 0 -ComputerConfiguration $ComputerConfiguration

$VMHost = Get-SCVMHost -VMMServer localhost | where {$_.Name -eq “HYPERV2012.DALARIS.LOCAL”}

$ComputerConfiguration = Get-SCComputerConfiguration -VMMServer localhost | where {$_.Name -eq “IIS1”}

New-SCP2V -VMMServer localhost -VMHost $VMHost -RunAsynchronously -JobGroup 7801807d-deee-4cc1-9354-3f06af46a5f7 -VolumeDeviceID “C” -Dynamic -IDE -Bus 0 -LUN 1 -ComputerConfiguration $ComputerConfiguration

$VMHost = Get-SCVMHost -VMMServer localhost | where {$_.Name -eq “HYPERV2012.DALARIS.LOCAL”}

$ComputerConfiguration = Get-SCComputerConfiguration -VMMServer localhost | where {$_.Name -eq “IIS1”}

New-SCP2V -VMMServer localhost -VMHost $VMHost -RunAsynchronously -JobGroup 7801807d-deee-4cc1-9354-3f06af46a5f7 -VolumeDeviceID “D” -Dynamic -IDE -Bus 1 -LUN 0 -ComputerConfiguration $ComputerConfiguration

$Credential = get-credential

$VMHost = Get-SCVMHost -VMMServer localhost | where {$_.Name -eq “HYPERV2012.DALARIS.LOCAL”}

$ComputerConfiguration = Get-SCComputerConfiguration -VMMServer localhost | where {$_.Name -eq “IIS1”}

New-SCP2V -Credential $Credential -VMMServer localhost -VMHost $VMHost -Path “D:\VM” -RunAsynchronously -JobGroup 7801807d-deee-4cc1-9354-3f06af46a5f7 -Trigger -Name “IIS1” -Description “Web Server” -ComputerConfiguration $ComputerConfiguration -CPUCount 4 -MemoryMB 4096 -StartAction TurnOnVMIfRunningWhenVSStopped -DelayStartSeconds 0 -StopAction SaveVM

Leave a Reply