Tuesday, December 20, 2011

VMware P2V Converter Best Practices

The best/easiest approach to converting a Windows operating system from a physical machine to a virtual machine is to perform a hot migration with VMware Converter installed locally on the source (physical machine) operating system. Below an overview of the different steps involved in a P2V (Physical to Virtual) conversion. Note that these steps only apply to Windows operating systems.


 BEFORE CONVERSION

  • Confirm that the source server has at least 200 MB free disk space on its system volume. This space is required to operate the disk snapshot features in VMware Converter
  • Confirm that the source machine has at least 364 MB RAM
  • If you have software mirroring, break the mirror (but not the data) since VMware converter does not support software mirrors.
  • Clean-up any temporary files and un-needed data
  • Change all hardware related services to “disabled” startup mode
  • Download the following utilities/scripts and install them to the directory c:\Temp\P2Von the source server. The following files are included:
    • p1-HWPhysical.bat
    • p2-installP2VConverter.bat
    • p3-SystemConfigUtil.bat
    • v1-HWVirtual.bat
    • v2-vmprofile.bat
    • v3-enablehdwacc.bat
    • v3-enablehdwacc.vbs
    • v4-renameNICs.bat
    • v4-renameNICs.vbs
    • v5-setip.bat
    • v6-uninstallP2Vconverter.bat
    • v7-SystemConfigUtil.bat
    • v8-hiddendevices.bat
    • v9-HALupdate.bat
    • PSPCleaner.exe
    • comm.exe
    • libiconv2.dll
    • libintl3.dll
    • devcon.exe
    • VMware vCenter Converter Standalone 4.01 build 161434 (See also http://www.vmware.com/download/converter/)
  • Log on to the source machine (mstsc -v: servername /F -console) with a local administrator account and open a command window
  • Run c:\Temp\P2V\p1-HWPhysical.bat
    •  The script creates a list of all devices of the physical machine (including non-present devices)
  • Install the VMware vCenter Converter Standalone software by executing c:\Temp\P2V\p2-installP2VConverter.bat
  • Run the System Configuration Utility on the source server by executing c:\Temp\P2V\p3-SystemConfigUtil.bat to reduce the number of services and applications running on startup (all software except for all Microsoft Services and VMware Converter Service).
    • On the General tab
      • Select “Selective Startup
      • Uncheck “Load Startup Items”
    • On the Services tab
      • Select “Hide All Microsoft Services”
      • Click “Disable All”
      • Mark the VMware vCenter Converter Agent
      • Mark the VMware vCenter Converter Server
    • Click “Apply”
    • Click “Close”
    • Click “Restart

CONVERSION

  • Log on to the source machine with a local administrator account
  • Start the VMware vCenter Converter Standalone application (A shortcut should be available on the desktop)
  • Select “Convert Machine”
  • Specify Source
    • Select source Type: Powered-on machine
    • Specify the powered-on machine: This local machine
    • Click NEXT
  • Specify Destination
    •  Destination Type
      • Select destination type: VMware Infrastructure virtual machine
      • VMware Infrastructure details
        • Server: type in the IP address of the ESX server you want to convert to (or of your Virtual Center server)
        • User name: type the user name of an administrative account for the above server
        • Password: type the password of the above user name
        • Click NEXT
    • Host/Resource
      • Select the ESX host/group you want to convert to
      • Virtual machine name: type the name of the destination virtual machine (this is normally already set)
      • Datasource: select the datastore in which to place the destination virtual machine
      • Click NEXT
  • View/Edit Options
    • Data to copy
      • Keep the defaults unless you need to re-size the partitions
      • Select “Ignore page file and hibernation file”
    • Devices
      • Select the number of processors: adapt if needed (Remember to revert the HAL after conversion if you are changing from a multi-processor to a uni-processor machine)
      • Disk controller: select SCSI LSI logic for Windows 2003 and beyond
      • Memory for this virtual machine: adapt if needed
    • Network adapters
      • Choose the number of network adapters you need
      • Select the appropriate VLAN
      • Select Connect at power-on
    • Services
      • Go to tab “Destination Services”
      • Change starting mode to “Disabled” for all services you will not need in the virtual machine
    • Advanced options
      • De-select “Synchronize changes that occur to the source during cloning”
      • De-select “Power on target machine”
      • De-select “Install VMware Tools on the imported machine”
      • Select “Remove System Restore checkpoints on destination”
      • Select “Reconfigure destination virtual machine”
    • Click NEXT
  • Ready to Complete
    • Review the summary information
    • Click NEXT

AFTER CONVERSION

  • Shut down the physical machine
  • Use the VI client to log on to your virtual center server or to your ESX server
  • Review and adjust the virtual hardware settings:
    • Adjust the number of NICs, CPUs, RAM, …
    • Remove any unnecessary devices such as serial ports, USB controllers, COM ports, floppy drives, …
  • Start the virtual machine
  • Log on to the virtual machine
  • Run c:\Temp\P2V\v1-HWVirtual.bat
    • Creates a list of all devices that matches the virtual machine
    • Compares the list of all devices of the physical machine (created in the step “before conversion” with the list of all devices that matches the virtual machine (created in the previous step)
    • Removes all phantom hardware
    • Rescans hardware
    • Reboots the  server
  • Change registry key regarding profile problem in VMware (see VMware article) by executing c:\Temp\P2V\v2-vmprofile.bat
  • Enable Video Hardware Acceleration by executing c:\Temp\P2V\v3-enablehdwacc.bat (this command calls the vbs script c:\Temp\P2V\enablehdwacc.vbs)
  • Rename your network connections by executing c:\Temp\P2V\v4-renameNICs.bat (this command calls the vbs script c:\Temp\P2V\renameNICs.vbs)
  • Set IP information on the first network connection by executing c:\Temp\P2V\v5-setip.bat  %1 %2 %3 %4 %5 %6 %7
  • From this step on you should be able to connect to the virtual server via RDP
  • Uninstall VMware vCenter Converter Standalone by executing c:\Temp\P2V\v6-uninstallP2Vconverter.bat
  • If you are converting from HP Proliant hardware you can clean up the HP hardware related drivers, utilities, agents using the HP Proliant Support Pack Cleaner from Guillermo Musumeci. Execute c:\Temp\P2V\PSPCleaner.exe
  • Run the System Configuration Utility on the virtual server by executing c:\Temp\P2V\v7-SystemConfigUtil.bat, select the “normal startup” option and reboot your server
  • Show all hidden devices and uninstall any unused devices by executing c:\Temp\P2V\v8-hiddendevices.bat
    • Select show hidden devices
    • Check if there are still unused devices present and uninstall them manually
  • Update the HAL if you changed from multi to uniprocessor by executing the script c:\Temp\P2V\v9-HALupdate.bat
  • Reboot your server
  • Install VMware Tools
Please also read the VMware vCenter Converter Standalone 4.0 Release Notes at http://www.vmware.com/support/converter/doc/releasenotes_conv40.html

No comments:

Post a Comment