P2V: Converting Physical Computers to Virtual Machines in VMM
Applies To: Virtual Machine Manager 2008, Virtual Machine Manager 2008 R2, Virtual Machine Manager 2008 R2 SP1
Did you know that System Center 2012 is available? System Center 2012 offers you a single, flexible platform to manage traditional datacenters, private and public clouds, and client computers and devices. Learn more about System Center 2012.
Microsoft System Center Virtual Machine Manager (VMM) allows you to convert existing physical computers into virtual machines through a process known as physical-to-virtual (P2V) conversion. VMM simplifies P2V by providing a task-based wizard to automate much of the conversion process. Since the P2V process is completely scriptable, you can initiate large-scale P2V conversions through the Windows PowerShell command line.
Note
VMM performs P2V conversions on a best-effort basis. We cannot guarantee that all possible combinations of physical hardware can be converted to a virtual machine.
Which Physical Computers Can I Convert?
The requirements for physical source computers depend on whether you are performing an online or offline P2V.
Online vs. Offline Conversions
The following table lists some of the differences between the online and offline P2V conversions.
Category | Online P2V | Offline P2V |
---|---|---|
Source computer availability |
The source computer continues to perform normal operations during the conversion. |
The source computer is taken offline during the conversion. |
Process |
VMM creates a copy of local NTFS volumes and data of VSS-aware applications. VMM leverages the Volume Shadow Copy Service (VSS) to ensure that data is backed up consistently while the server continues to service user requests. VMM uses this read-only snapshot to create a VHD. |
The source computer restarts into the Windows Preinstallation Environment (Windows PE), and then VMM clones the volume to a VHD. Finally, VMM restarts the source computer into the original operating system. |
Compatibility |
Online P2V is the default for the operating systems on most physical computers. |
Offline P2V is the only option for Windows 2000 Server conversion, the only method to reliably migrate FAT volumes, and the recommended method for converting domain controllers and servers that run ADAM or AD LDS. |
Advantages |
Source computer is available throughout the conversion. |
Offline P2V can be the most reliable way to ensure data consistency and is the only option in certain situations (see above). |
Note
With both online and offline P2V, VMM temporarily installs an agent on the physical source computer to be converted.
Requirements on the Source Machine
To perform a P2V conversion, your source computer:
Must have at least 512 MB of RAM.
Cannot have any volumes larger than 2040 GB.
Must have an Advanced Configuration and Power Interface (ACPI) BIOS – Vista WinPE will not install on a non-ACPI BIOS.
Must be accessible by VMM and by the host computer.
Cannot be in a perimeter network. A perimeter network, which is also known as a screened subnet, is a collection of devices and subnets placed between an intranet and the Internet to help protect the intranet from unauthorized Internet users. The source computer for a P2V conversion can be in any other network topology in which the VMM server can connect to the source machine to temporarily install an agent and can make Windows Management Instrumentation (WMI) calls to the source computer.
Important
Before you convert a VMware virtual machine to a Hyper-V or Virtual Server virtual machine, you must uninstall VMware Tools on the guest operating system of the virtual machine.
The following table lists the Windows operating systems for which P2V conversions are supported in VMM 2008 and in VMM 2008 R2.
Note
Support for Windows 2000 Server and Windows XP SP2 ended on July 13, 2010. After this date, integration services for these operating systems will not be updated and support will not be available for any issues arising from using these operating systems in virtual machines. For more information about the end of support, see Support for Windows 2000 and Windows XP Service Pack 2 (SP2) Ends on July 13, 2010 (https://go.microsoft.com/fwlink/?LinkID=196755).
Supported Operating Systems for P2V Conversions in VMM 2008 and VMM 2008 R2
Operating System | VMM 2008 | VMM 2008 R2 |
---|---|---|
Windows XP Professional with Service Pack 3 (SP3) |
Yes |
Yes |
Windows XP 64-Bit Edition SP3 |
Yes |
Yes |
Windows Server 2003 Standard Edition (32-bit x86) |
Yes (Requires SP1 or later.) |
Yes (Requires SP2 or later.) |
Windows Server 2003 Enterprise Edition (32-bit x86) |
Yes (Requires SP1 or later.) |
Yes (Requires SP2 or later.) |
Windows Server 2003 Datacenter Edition (32-bit x86) |
Yes (Requires SP1 or later.) |
Yes (Requires SP2 or later.) |
Windows Server 2003 x64 Standard Edition |
Yes (Requires SP1 or later.) |
Yes (Requires SP2 or later.) |
Windows Server 2003 Enterprise x64 Edition |
Yes (Requires SP1 or later.) |
Yes (Requires SP2 or later.) |
Windows Server 2003 Datacenter x64 Edition |
Yes (Requires SP1 or later.) |
Yes (Requires SP2 or later.) |
Windows Server 2003 Web Edition |
Yes |
Yes |
Windows Small Business Server 2003 |
Yes |
Yes |
Windows Vista with Service Pack 1 (SP1) |
Yes |
Yes |
64-bit edition of Windows Vista with Service Pack 1 (SP1) |
Yes |
Yes |
Windows Server 2008 Standard 32-Bit |
Yes |
Yes |
Windows Server 2008 Enterprise 32-Bit |
Yes |
Yes |
Windows Server 2008 Datacenter 32-Bit |
Yes |
Yes |
64-bit edition of Windows Server 2008 Standard |
Yes |
Yes |
64-bit edition of Windows Server 2008 Enterprise |
Yes |
Yes |
64-bit edition of Windows Server 2008 Datacenter |
Yes |
Yes |
Windows Web Server 2008 |
Yes |
Yes |
Windows 7 |
No |
Yes |
64-bit edition of Windows 7 |
No |
Yes |
64-bit edition of Windows Server 2008 R2 Standard |
No |
Yes |
64-bit edition of Windows Server 2008 R2 Enterprise |
No |
Yes |
64-bit edition of Windows Server 2008 R2 Datacenter |
No |
Yes |
Windows Web Server 2008 R2 |
No |
Yes |
The following restrictions apply to P2V operation system support:
VMM does not support P2V conversion for computers with Itanium architecture–based operating systems.
VMM does not support P2V on source computers running Windows NT Server 4.0. However, you can use the Microsoft Virtual Server 2005 Migration Toolkit (VSMT) or third-party solutions for converting computers running Windows NT Server 4.0.
VMM 2008 R2 does not support converting a physical computer running Windows Server 2003 SP1 to a virtual machine that is managed by Hyper-V. Hyper-V does not support Integration Components on computers running Windows Server 2003 SP1. As a result, there is no mouse control when you use Remote Desktop Protocol (RDP) to connect to the virtual machine. To avoid this issue, update the operating system to Windows Server 2003 SP2 before you convert the physical computer. As an alternative, you can convert the computer by using VMM 2008 and then deploy the virtual machine in VMM 2008 R2.
Requirements for the Destination Host Server
In VMM, a host is a physical computer on which you can deploy one or more virtual machines. To run P2V, you need a host on which to place the image of the source computer.
Requirements for the host server include:
The destination host during a P2V conversion can be running Windows Server 2008 with Hyper-V, Windows Server 2008 R2 with Hyper-V, or Virtual Server R2 SP1 (or later).
The destination host cannot be in a perimeter network.
As in any virtual machine creation or migration, the destination host for a P2V conversion must have sufficient memory for the virtual machine in addition to memory reserved for the host operating system. By default, the amount of memory reserved for the host operating system is 256 MB in VMM 2008 or 512 MB in VMM 2008 R2. If the host does not have enough memory for the virtual machine in addition to the memory reserved for the host, you will get a placement error in the Convert Physical Server Wizard.
Deciding Which Computers to Convert
To successfully perform P2V, you must be able to identify appropriate physical workloads for consolidation into the virtualized environment. This section will help you identify which computers are good candidates for conversion.
Identifying Virtualization Candidates
If you have deployed Microsoft System Center Operations Manager 2007, VMM can help you identify the right physical servers for consolidation based on direct analysis of the performance counters of the target machine or historical performance data stored in the Operations Manager database.
The Virtualization Candidates report helps you identify underutilized computers by displaying average values for a set of commonly requested performance counters for CPU, memory, disk usage, hardware configurations, including processor speed, number of processors, and total RAM. To use the Virtualization Candidates report, you must deploy the System Center VMM 2008 Management Pack. For more information about reporting, see Configuring Reporting for VMM.
Prioritizing Virtualization Candidates
When identifying the best candidates for P2V conversion, consider converting these types of computers, in order of preference:
Non business-critical underutilized computers. By starting with the least utilized computers that are not business critical, you can learn the P2V process with relatively low risk. Web servers may make good candidates.
Computers with outdated or unsupported hardware that needs to be replaced.
Computers with low utilization that are hosting less critical in-house applications.
Computers with higher utilization that are hosting less critical applications.
The remaining underutilized computers.
In general, business-critical applications, such as e-mail servers and databases that are highly utilized, should only be virtualized to the Hyper-V platform in the Windows Server 2008 (64-bit) operating system.
How to Perform a P2V Conversion
During a P2V conversion, disk images of the hard disks on the source computer are packaged into virtual hard disks (.vhd files), and then prepared to ensure that the operating system will operate in the virtualized environment on the destination host.
Before You Begin
The following list includes tasks that you should perform before starting the P2V conversion:
Before you begin performing P2V conversions, we recommend that you run the System Center Virtual Machine Manager 2008 and 2008 R2 Configuration Analyzer (VMMCA) on the VMM server, the destination hosts, and the source machines.
The VMMCA is a diagnostic tool you can use to evaluate important configuration settings for computers that either are serving or might serve VMM roles or other VMM functions. The VMMCA scans the hardware and software configurations of the computers you specify, evaluates them against a set of predefined rules, and then provides you with error messages and warnings for any configurations that are not optimal for the VMM role or other VMM function that you have specified for the computer.
You can download the VMMCA from the System Center Virtual Machine Manager 2008 and 2008 R2 Configuration Analyzer download page (https://go.microsoft.com/fwlink/?LinkId=100597). For a list of VMM updates that the VMMCA checks that the VNNCA checks for, see List of Virtual Machine Manager (VMM) Updates (https://go.microsoft.com/fwlink/?LinkId=214715) on the Technet Wiki.
The first phase of a P2V conversion is to survey the hardware configuration of the source computer and make sure the patch cache contains all necessary drivers and system files to support the drives emulated by the target virtualization software. If any drivers are missing, you will get specific error messages indicating where to get the necessary drivers.
Note
You can use the Add-Patch cmdlet to manually download available patches to VMM.
Bad sectors on disk cannot be transferred during a P2V conversion. To avoid data loss, run a disk maintenance tool, such as Chkdsk, on the source computer to detect and correct any file system errors.
To help minimize the time required for the imaging phase, perform a disk defragmentation on the source computer's hard drives. Also, ensure that you have a fast network connection between the source computer and the host.
Use dynamic Virtual Hard Disks (VHD) to conserve disk space on the destination host. For example, if you convert 5 GB of data on a 40 GB hard drive, VMM will create a dynamically expanding 40 GB VHD that occupies approximately 5 GB of disk space and can expand up to 40 GB. The actual size depends on fragmentation of the original volume plus some VHD format overhead.
Note
It is not possible to shrink the size of a disk.
For online P2V only: Make sure that all critical applications running on the source computer have VSS-aware writers or that they are stopped.
For offline P2V only: Be prepared to supply NIC and mass storage drivers that are compatible with Windows Vista. VMM will evaluate the source physical computer and compare it with the drivers included in Windows PE 2.0 and provide instructions on adding drivers on the source computer.
Convert Physical Server Wizard
You can use the Convert Physical Server Wizard to create a new virtual machine from a physical source computer. For more information, see P2V: How to Perform a Conversion.
Note
You can provide the IPv4 or IPv6 address instead of machine names in the Convert Physical Server Wizard or from the command line.
After the P2V is complete, remove any unnecessary vendor-specific hardware utilities and drivers from the virtual machine.
Note
The Convert Physical Server Wizard invokes the New-P2V cmdlet. Some conversion options are only available from the command line.
Performing P2V from the Command Line
You can perform a P2V conversion from Windows PowerShell by using the New-P2V cmdlet. To get a base script that you can customize, run the Convert Virtual Machine Wizard from the VMM Administrator Console and click the View Script button.
For more information about using the New-P2V cmdlet type Get-Help New-P2V in the Windows PowerShell – Virtual Machine Manager command shell.
The P2V Process
The P2V conversion process captures an image of the source disk and modifies the operating system and drivers to make them compatible with the Hyper-V or Virtual Server emulated hardware. Online and offline P2V conversions use two distinct processes:
Online Conversion
Online conversion does not require a restart of the source computer. VMM uses the Volume Shadow Copy Service (VSS) to create an image of the source machine that is consistent on the application level and then creates an analogous virtual machine. The online conversion process consists of five steps:
Installing the agent on the source computer
Retrieving hardware configuration
Imaging
Fixing up
Creating the virtual machine
Virtual Machine Manager installs the P2V agent on the source computer to gather the hardware and software configuration. After the conversion is complete, the agent is removed.
Important
The VMM agent Windows Installer creates a firewall exception for remote administration (RemoteAdmin service) and Secure Sockets Layer (SSL) port. These exceptions are removed when the VMM agent is removed at the end of the P2V process. The HTTPS port default is TCP 443.
VMM gathers the source computer's hardware and software configuration, as follows:
The VMM agent gathers information about hardware, software, services, hotfixes, and the disk layout (file system, volume type). The VMM agent exports this information to the VMM database as a machine configuration file in XML format.
VMM determines whether the source machine can be virtualized. VMM confirms that the operating system is supported and that the physical configuration can be made compatible with the destination virtualization software. VMM verifies that the required files are present in the patch cache and downloads any missing patches to the Patch Import directory on the VMM server.
Imaging phase:
A Volume Shadow Copy Service (VSS) image is captured for each selected volume that is consistent on the application level. If a dynamic destination VHD format is selected, this process captures data only, not empty space.
Data is streamed directly from the source computer to the VMM host using Background Intelligent Transfer Service (BITS).
Each physical volume becomes a separate virtual hard disk.
Fix-Up phase. VMM prepares the operating system and the virtual hard disks for virtual machine creation.
Create Virtual Machine phase:
VMM creates the virtual machine.
VMM attaches virtual hard disks, network adapters, CD-ROM, and memory.
Offline Conversion
Offline P2V is the most reliable way to ensure data consistency because it creates an exact copy of the source computer while it is not in use. Also, offline P2V is the only option for converting Windows 2000 Server, domain controllers, and non-NTFS volumes. Unlike online conversions, the user must provide any missing drivers if Windows PE does not support the source computer. The offline conversion consists of four steps:
Agent installation. Virtual Machine Manager installs the VMM agent on the source computer.
The VMM agent installs a Windows PE image on the source computer, modifies the boot record, and restarts in Windows PE instead of the base operating system.
VMM begins streaming physical disks. There are no snapshots in this process.
The remainder of the process is similar to the Fix-Up phase and Create Virtual Machine Phase in an online P2V.
Troubleshooting an Offline P2V Conversion
To enable tracing on the source computer during an offline P2V conversion, create a file named scvmm_enable_winpe_tracing.txt and save the file to the root of the source computer's boot volume. This file does not need to contain any data or information. A trace file named scvmm_winpe.etl will be created and saved on the source system. For additional troubleshooting information for P2V conversions, see VMM: Troubleshooting P2V Conversion Issues (https://go.microsoft.com/fwlink/?LinkId=207409) on the Microsoft TechNet Wiki.