Converting Physical Computers to Virtual Machines in VMM (P2V Conversions)
System Center Virtual Machine Manager (VMM) allows you to convert existing physical computers into virtual machines, which is known as a P2V conversion. VMM simplifies P2V by providing a wizard to automate much of the conversion process.
To watch a video of the P2V process, see “VMM Introduction - Physical to Virtual Machine Migration” (mms://wm.microsoft.com/ms/systemcenter/scvmm/demo/vmm_intro_03.wmv).
Which Physical Computers Can I Convert?
The requirements for physical computers depend on whether you are performing an online or offline P2V. In both cases, VMM temporarily installs an agent on the physical source computer that you want to convert. By using online P2V, VMM uses the Volume Shadow Copy Service (VSS) to copy data while the server continues to service user requests. The source computer is not restarted during the conversion. By using offline P2V, the source computer reboots into the Windows Preinstallation Environment (Windows PE) before VMM converts the physical disks to Virtual Hard Disks (VHDs).
Operating System Requirements
To perform a P2V, your source computer must meet the operating systems requirements described in the following table.
|Operating System on Source Computer||P2V (Online)||P2V (Offline)||Not Supported|
Microsoft Windows 2000 Server Service Pack 4 (SP4)
The Windows Server 2003 operating systems with Service Pack 1 (SP1)
The Windows Server 2003 R2 Standard Edition operating system
The Windows XP operating systems with SP1
The Windows Server 2003 R2 Standard x64 Edition operating system
The Windows XP Professional x64 Edition operating system
The Windows Vista operating system
The Microsoft Windows NT Server 4.0 operating system
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.
For more information about the recommended system requirements for VMM deployment scenarios, see "Virtual Machine Manager System Requirements" (http://go.microsoft.com/fwlink/?LinkId=69926).
To perform a P2V, your source computer must meet the additional requirements, as shown in the following table.
|Additional Requirements for Source Computers||P2V (Online)||P2V (Offline)|
Domain: Must be in the same domain as the VMM server or a member of a domain that has a full two-way trust with the VMM server’s domain.
RAM: Must have at least 512 MB.
Updates: Although updates will not affect most P2V conversions, certain system files and drivers are replaced during the conversion and may require updates. If those files are missing, you will need to add them to the Patch Import directory on the Virtual Machine Manager server.
Requirements for the Host Server
In Virtual Machine Manager, a host is a physical computer on which can deploy one or more virtual machines. To run P2V, you need a host on which to place the image of the source machine disks copied in VHD format while the virtual machine is being built.
Requirements for the host server include:
- Virtual Server R2 SP1 or later
- Adequate RAM (256 MB, plus memory for the virtual machine)
By default, the amount of memory reserved for the target host is 256 MB. This amount is in addition to the memory required for each source computer. If the host does not have enough memory, you will get a placement error in the Convert Physical Server Wizard.
You cannot configure the virtual machine memory from the Convert Physical Server Wizard. To perform a P2V from the wizard, you will need a host that can support the source computer's memory.
If you need to increase or decrease the allotted virtual machine memory, you must perform the P2V from the command line. You will need to run the New-P2V cmdlet and set the MemoryMB parameter to a lower memory value.
Deciding Which Computers to Convert
To successfully perform P2V, you must know which computers you can and want to convert. The topics in this section help you identify which computers are good candidates for conversion.
Identifying Virtualization Candidates
The Virtualization Candidates report helps you identify underutilized computers by displaying average values for a set of commonly requested performance counters for CPU, memory, and disk usage, along with hardware configurations, including processor speed, number of processors, and total RAM. You can limit the report to computers that meet specified CPU and RAM requirements and you can sort the results by selected columns in the report.
For more information about opening a report, see "How to Open a Report" in the Virtual Machine Manager Help (http://go.microsoft.com/fwlink/?LinkId=99216)
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 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 Windows Server virtualization (WSv) platform in the Windows Server 2008 operating system.
Windows Server 2008 is not supported in this version of VMM.
How to Perform a P2V Conversion
During a P2V conversion, disk images of the hard disks on the source computer are copied and formatted as virtual hard disks (.vhd files) for use in the new virtual machine.
Before You Begin
The following list includes tasks that you should perform before starting the P2V conversion:
- 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 configuration. If any drivers are missing, you will get specific error messages indicating where to get the necessary drivers.
- 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 to conserve disk space. For example, if you convert 5 GB of data on a 40 GB hard drive, VMM will create a dynamically expanding VHD of 5 GB that can grow up to 40 GB.
- For offline P2V only:
- Install the Windows Automated Installation Kit (WAIK) on the VMM Server. To download WAIK, go to http://go.microsoft.com/fwlink/?LinkId=86477.
- Supply the most recent drivers. In the Convert Physical Server Wizard, supply storage and network drivers compatible with the hardware of the source machine to be converted. Use one of the following drivers, listed in order of priority:
- Windows Vista 32-Bit
- Windows XP 32-Bit
- Windows Server 2003 32-Bit
- Windows 2000 Server 32-Bit
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 the "How to Convert a Physical Server to a Virtual Machine" topic in VMM Help (http://go.microsoft.com/fwlink/?LinkId=98991).
- After the P2V is complete, remove any unnecessary vendor-specific hardware utilities and drivers from the virtual machine.
Performing P2V from the Command Line
You can perform a P2V conversion from Windows PowerShell by using the New-P2V cmdlet.
- For more information about using the New-P2V cmdlets see the "Windows PowerShell Scripting in Virtual Machine Manager" section of the VMM Scripting Guide (http://go.microsoft.com/fwlink/?LinkId=91727).
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 Virtual Server-emulated hardware. There are two distinct P2V processes that you can use: online and offline.
Online conversion does not require you to restart the source computer. VMM uses the Volume Shadow Copy Service (VSS) in Windows Server 2003 and Windows XP to create an application-level image of the source machine and create an analogous virtual machine without needing to fully shut down the source computer. The online conversion process consists of five steps:
- Installing the agent on the source computer
- Getting hardware configuration
- Fixing up
- Creating the virtual machine
Virtual Machine Manager installs the VMM agent on the source computer to gather the hardware and software configuration. After the conversion is complete, the agent is removed.
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.
VMM gathers the source computer's hardware and software configuration, as follows:
- The VMM agent gathers information about hardware, software, services, hotfixes, and the volume (file system, volume type, sectors). 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 is compatible with Microsoft Virtual Server. 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.
- A Volume Shadow Copy Service (VSS) image is captured for each NTFS volume. If a dynamic destination VHD format is selected, this process captures data only, not empty spaces.
- 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 virtual hard disks and prepares 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 P2V is the only option for Windows 2000 Server conversions, because Windows 2000 Server does not support VSS. 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 and modifies the boot record. As a result, the source computer boots into 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.
If the offline P2V fails for any reason and you do not restart the P2V immediately, uninstall the VMM agent from source computer or run the Remove-MachineConfig cmdlet to ensure that the source computer will boot into its original operating system.
The following section lists common questions and answers about the P2V process. If you do not see the answer here, you can post questions on the System Center Virtual Machine Manager forums at http://go.microsoft.com/fwlink/?LinkId=85919.
Q: Can I convert a computer that is not joined to a domain?
A: No, VMM P2V requires that the source computer is in the same domain as the VMM server or a member of a domain that has a full two-way trust with the VMM server’s domain. A potential workaround is to temporarily add your computer to the domain, and then remove the resulting virtual machine after the conversion.
Q: Can I run more than one P2V process simultaneously from one Administrator Console?
A: Yes, you can run multiple P2V processes simultaneously by starting a P2V Wizard after one wizard is done or by launching multiple P2Vs from Windows PowerShell by using the New-P2V cmdlet. The product has no limitation on the number of P2V processes running simultaneously.
Q: Can I P2V a computer with more than 3.6 GB of RAM?
A: Yes. Although the Convert Physical Server Wizard does not allow you to set the amount of virtual machine memory, you can perform the P2V with a Windows PowerShell script. You can specify the amount of RAM that the resulting virtual machine has configured with the New-P2V cmdlet and the –MemoryMB switch. For more information, see "Windows PowerShell Scripting in Virtual Machine Manager" (http://go.microsoft.com/fwlink/?LinkId=91727).
Q: VM Additions were not installed during the P2V process. What should I do?
A: By default, VM Additions are not installed during the P2V process with VMM v1. To install VM Additions through the Administrator Console:
- Open the virtual machine properties.
- Click the Hardware Configuration tab.
- Add a DVD drive to the IDE device if there is not one there already
- Click Known image file, browse to the VMAdditions ISO, and then click OK.
- Click Apply.
- Log in to the guest operating system running inside the Virtual Machine and complete the VM Additions installation.
If the Known image file list does not currently include VMAdditions, you can copy the VMAdditions.iso file from Microsoft Virtual Server 2005, which is installed by default on a VMM host. You can find the VMAdditions.iso file at <C>:\Program Files\Microsoft Virtual Server\Virtual Machine Additions. Copy the file to a library server share, and then refresh that share through the Administrator Console.
Q: If I reach the “Select VM Host” step in the P2V Wizard and all of the virtual machine hosts have exceeded their maximum resource capacities, can I go to the Administrator Console and adjust resources?
A: Not in this version of VMM. Stop the P2V Wizard, adjust the resources, and then restart the wizard. Also, you can start another instance of the VMM Administrator Console.
Q: Does the P2V process use the WS-Management protocol, formerly known as Windows Remote Management or WinRM?
A: No, P2V does not use the WS-Management protocol. The only exception is if you P2V a VMM-managed computer such as a host, library server, or the VMM Server.
Q: How do I convert a physical DVD drive to a virtual drive?
A: During a P2V, VMM creates a DVD drive if the source machine has a physical DVD drive and if there is an available IDE slot. However, after the virtual machine is created, you can add a DVD drive to the virtual machine from the command line by updating its properties.
Q: If my source machine has four volumes and a DVD drive, how can I retain the DVD drive on the resulting virtual machine?
A: In this situation, you would need to remove a VHD to free a bus for the DVD drive. You would do this by removing the VHD from the hardware configuration, saving the property changes, re-opening the Properties dialog box, and then adding the DVD drive to the hardware configuration. Then the VHD can be added to the virtual machine through the SCSI bus.
Q: How can I tell the status of the P2V conversion?
A: You can view the P2V status by clicking the Jobs tab at the bottom left of the Administrator Console, clicking the job at the top, and then viewing the results of the running job on the lower right.
Q: Does VMM convert VMware virtual machines?
A: Yes. P2V can convert physical computers or virtual machines presented as physical entities. You can specify the machine name of a VMWare virtual machine and run P2V. You can also run a virtual machine to virtual machine (V2V) conversion. See Converting VMWare Virtual Machines (V2V Conversions) (http://go.microosft.com/fwlink?LinkId=98833).
Q: Can I uninstall updates within a virtual machine?
A: No, you should not uninstall updates within the virtual machine after a P2V operation. Treat virtual machines like physical computers and keep them up-to-date with the latest updates.
Before beginning a formal troubleshooting process, confirm that:
- The source computer is in the same domain as the VMM server or a member of a domain that has a full two-way trust with the VMM server’s domain.
- The source computer has one of the following operating systems installed:
- Windows 2000 Server with Service Pack 4 (SP4)
- The Windows Server 2003 with Service Pack 1 (SP1) operating systems
- Windows Server 2003 R2
- The Windows XP with Service Pack 1 (SP1) operating systems
General Troubleshooting Strategy
Find the source of the error by opening the Jobs view, selecting a job, and then clicking the Change Tracking tab in the details pane. Find the job where the Status property changed. After you find this job, click the Summary tab of the details pane to investigate the issue.
Failed P2V Conversions
Any P2V task failure places the virtual machine in the Physical-to-Virtual Conversion Failed state. The following sections describe some of the most common causes and possible resolutions.
Numbered Error Codes
- Cause: You receive a specific error code such as Error 2940.
- Resolution strategy: See "Virtual Machine Conversion Issues" (http://go.microsoft.com/fwlink/?LinkId=98827).
- Cause: In an offline P2V conversion, Virtual Machine Manager cannot contact the source computer after it reboots into the Windows Preinstallation Environment (Windows PE).
- Resolution strategy: Determine if Windows PE can install storage or network drivers by examining scvmm_winpe_setupapi.log on the boot volume of the source computer while it is under Windows PE. Find out which drivers are required and install the drivers with the Use storage and network drivers from the following location check box in the Convert Physical Server Wizard or the -DriverPath parameter in New-P2V cmdlet.
- Cause: The Volume Shadow Copy Service (VSS) fails to take a snapshot of the contents of the source computer's drives.
- Resolution: View the system and application event logs for VSS errors. If you cannot correct them, try to do an offline P2V, which does not use VSS.
- Cause: Installation of the VMM agent on the source computer fails.
- Resolution strategy: If the installation of the VMM agent on the source computer fails, view the VMM*.log in the <Windows>\Temp directory on the source computer to gather additional information.
Patch or driver
- Cause: A patch or driver file that is required for the P2V Fixup step is missing.
- Resolution strategy: If a patch file or driver is missing, download the requested patch and driver files to the Patch Import directory on the Virtual Machine Manager server (the default path is <C>:\Program Files\Microsoft System Center Virtual Machine Manager 2007\Patch Import), and extract the files by using the Add-Patch cmdlet.
Less than 512 MB RAM (offline P2V only)
- Cause: Source computer has less that 512 MB RAM.
- Resolution strategy: Add more RAM to the source computer to equal at least 512 MB.
- Cause: Cannot troubleshoot offline P2V.
- Resolution strategy: To enable tracing on the source computer during an offline P2V, create a file named scvmm_enable_winpe_tracing.txt and save it 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.
- Cause: Firewall blocks P2V by not allowing an exception for remote administration (RemoteAdmin service).
- Resolution strategy: If the firewall is controlled by Group Policy, use GPEDIT.msc to enable an exception for the IP address of the VMM Host server, for open ports, and for authorized applications. The path is: GPEDIT.msc->Computer configuration->Administrative Templates_>Network->Network Connections->Windows Firewall