VMware vConverter - P2V for Windows Servers

AID: 3639
  • Status: Published

102731 points

  • ByBestWay
  • TypeTutorial
  • Posted on2010-08-29 at 16:50:25
Awards
  • Community Pick
  • Experts Exchange Approved
In this article I will like to share some of my experience in P2V Physical Windows Servers.

This tutorial will use as a Single Cold Migration, but many of the pre and post tasks, can be used in a Standalone Migration.  Additionally, this article will focus on Windows Operating System Servers  that are either Physical Servers with local disks or with storage disks.

--------------------------------------- // ---------------------------------------
This guide describes the procedure to convert/Migrate a Physical Server to Virtual Server (P2V) in Windows Servers.

At the end of this document you will be able to:

•      Follow all the requirements analysis to migrate Windows servers to Virtual Server(P2V):
•      Follow all the pre- tasks before P2V Windows Server.
•      Use vConverter Boot CD to P2V (single cold migration) Windows Servers.
•      Follow post-tasks after P2V Windows Server
.

> Required software

VMware vCenter Converter Boot CD.
P2V Scripts.

> P2V requirement analysis and check.

•       Check for any System Operation issues or Hardware issues, regarding P2V this SO or this type of Hardware.
http://www.vmware.com/support/pubs/converter_pubs.html

Note: Check the type of Windows Server license. OEM licenses or Appliance Editions cannot be P2V or will need special attention.

•      Check the Physical Server Applications and is Server for any issues regarding Virtualization methods.
•      Check Storage in the Virtualization Infrastructure to hold the Physical Server(all the disks).
•      Check if the physical server has the minimum 200Mb free disk space and at least 364 Mb memory (RAM).
•      Check if the server will use serial ports or USB, P2V will need to be restricted to an ESX host with physical serial device.
•      Check if the server as any Storage allocated, or any shared disks. If server as any Storage disks, Storage team need to be involved in the P2V process, and some additional tasks need to be added.


>  Virtual environment analysis:

•      Check if there is enough CPU available in the virtual environment to accommodate the new VMs needs.


Note: Physical machines with multiple CPUs but only using single threaded applications should be set to 1vCPU. Adding extra CPUs would waste CPU time / cycles because the applications would not make use of it.

•      Check if there is enough RAM available in the virtual environment to accommodate the new VMs needs.


>  P2V Pre-requirements tasks:

Clean any software related to any hardware management and any unneeded data or services.

On the Physical Server:

•      Login as local administrator.
•      Stop any software mirroring, break the mirror (but not the data) since VMware converter does not support software mirrors.
•      Clean-up any temporary files and unneeded data.
      Note: For this task I use a free tool to do the job ( CCleaner - http://www.piriform.com/ccleaner).
•      Defrag and fix servers disks errors (will reduce the migration time and fix some possible migration errors). Run this task for each local disk.
      Note: For this task I use a free tool to do the job (MyDefrag http://www.mydefrag.com).
•      Extract the P2V Scripts to the physical server “c:\P2V” (create the P2V directory if not exists).

Run the System Configuration Utility to disable all unnecessary software services on start.
Go to Start Menu and Run > msconfig

      
Note: For Windows NT and 2000 servers, you need to use the msconfig.exe from a Windows XP. Just copy the msconfig.exe to the physical server and use it.


Or go to console and run c:>msconfig

      •      On the General tab
1.      Select "Selective Startup
2.      Uncheck "Load Startup Items"

      •      On the Services tab
1.      Select "Hide All Microsoft Services"
2.      Click "Disable All"

      •      Click "Apply"
      •      Click "Close"

> P2V Hardware and Network Settings:

     Let’s start to import the physical machine settings to use after in the VM settings.
       Run c:\P2V\EE-Pre1.bat

•      The script creates files with Network Settings, Disk Drivers Letters.
•      Files Created: Route_Settings.txt, IP_Settings.txt, Disk_Letters.txt, PhysicalMachine.txt.
•      The script creates a list of all devices of the physical machine (including non-present devices).

Note: For a better disk letter or partition control for further view, you can take a print screen for the Disk Management partitions and save on the physical server.

> P2V Storage Pre-requirements tasks:

First we need to check if there is any Storage Disks attach to the physical server.
Disks that are assigned from the disk array to the physical host have to be treated in special way. First they have to be protected during the P2V migration process. Second task is to provide the recovery point for roll back of the migration. Last task is to reconnect all LUNs to migrated Virtual Machine.

Check if there is any Storage Disk checking if there is any FC Adapter.

•      Go to Start Menu and Run > devmgmt.msc

Check if there is any Storage Disk checking if there is any FC Adapter.
•      Go to Start Menu and Run > devmgmt.msc

And check SCSI and RAID controllers
img002.gif
  • 4 KB
  • SCSI Controlleres
SCSI Controlleres

      If there is Storage Disks and FC Adapters, follow the above tasks.

This next section is only needed if your physical server uses Storage data disks. If this is not the case, bypass this section.

Download a small tool to get adapter/disks information for Storage team.

http://www.microsoft.com/downloads/details.aspx?FamilyID=73d7b879-55b2-4629-8734-b0698096d3b1&displaylang=en

•      Install the fcinfo_x86.msi

(Fibre Channel Information Tool is a command line interface (CLI) tool that supports scripting. The Fibre Channel Information Tool requires the following:
Windows Server 2003  or Windows 2000 Server, SP3 or greater (SP4 recommended).
A Fibre Channel HBA driver that supports the HBAAPI standard.)


•      Using the fcinfo get the WWN and the LUN ID for each disk.

After installing the small tool, Go to Start Menu and Run> cmd

Then just run the following command in the console:
c:>fcinfo /mapping > c:\P2V\Files\Storage_Settings.txt

(Targeted command: if no adapter specified, defaults to adapter 0)
Output example:

		com.emulex-LP9002-0, num: 9
---------------------------------------------------------------
(DeviceName,           B, T, L) <--- B=Bus, T=Target, L=LUN
( \\.\PhysicalDrive1:, 1, 0, 0)
(FcId, 	WWN, 				PortWWN, 			  L)
(x11556, 20:00:00:20:37:0b:6d:6d, 21:00:00:20:37:0b:6d:6d, 0)

                                    
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:

Select allOpen in new window


      Note:  Send this information to the Storage team before start the P2V.
Following tasks has to be performed to protect LUNs during P2V migration.
This pre-Storage tasks need to be done in the Storage Management side.

•      Identify all LUNs connected to physical server.
•      Create SnapView session for each LUN connected to the physical server.
•      Confirm that all sessions have been created correctly.

> After all this tasks, put the Converter BootCD in the CD-ROM, and restart the server.

> Start the P2V Windows Server migration.
Start with the P2V tasks:

•      When the server starts, the vConverter BootCD will boot up.
•      After the vConverter BootCD start, need to start the P2V migration.

Note:  If this Physical Server is a Windows NT4 server which has Service Pack 6a you need to add two files to the vConverter (startup) as per the requirements:

Requirements Files:
SP6I386.exe
http://www.filewatcher.com/m/sp6i386.exe.35720696.0.0.html
KB885835
http://www.microsoft.com/downloads/details.aspx?FamilyId=325EAA8F-AF09-4839-B9E8-BB218C7A8564&displaylang=en
Use and add this files then continue with the P2V Migration.

> Customizing Physical server (source)
vConverter will start to collect information from the Physical server.

img003.jpg
  • 17 KB
  • P2V001
P2V001


In this screen do not update network parameters.
img005.jpg
  • 15 KB
  • P2V002
P2V002


Choose “Conversion Machine” option.
img010.jpg
  • 29 KB
  • P2V003
P2V003


Next on the source.
img008.jpg
  • 31 KB
  • P2V004
P2V004



> Customizing the Virtual Machine and resources (destination).

This task is to choose what to migrate, and choose the allocation for the P2V resources.


Choose what disks are to migrate to Virtual environment.
img015.jpg
  • 37 KB
  • P2V005
P2V005

img013.png
  • 50 KB
  • P2V006
P2V006

Very important Notes:
1.  You can choose to create a separate disk for each volume, however, active and system volumes will not be separated onto individual disks if they currently together on one. So don’t choose this option in these cases.
2.  If you have any Storage disks do not select to migrate. In this example we do not migrate the Storage disks, we will reattach the disks into the new Server(in this case the new VM).
3.  Some Server brands use dedicated partitions to hold the restore RAID point. In this cases choose selecting the volumes and de-select this partition, leave the rest selected.

If choose to separate the migration partitions for one physical disk (example 1 physical disk and 3 partition) please be aware of the notes(point 1) in above.
.
This is P2V to a VMware infrastructure, so choose VMware Infrastructure.
img021.jpg
  • 37 KB
  • P2V007
P2V007


> Specify Destination Source:

•  Destination Type.
   o  Select destination type: VMware Infrastructure virtual machine.
   o  VMware Infrastructure details .

•  Server: (choose the ESX host, or Virtual Center to migrate this P2V).
   o  User name: (Provided by the VMware ESX administrator).
   o  Password: type the password of the above user name.
   o  Click NEXT


•  Host/Resource.
   o  Select the ESX-vCenter host/group you want to convert to.
   o  Virtual machine name: type the name of the destination virtual machine.
   o  Datasource: Select disk Storage allocation (need to choose the path/storage to allocate the VM, and VM disks).
   o  Click NEXT


> Virtual Machine settings and resources:
Change or add the settings and the resources for the Virtual Machine that is created in this P2V.

•  Network adapters.
   o  Choose the number of network adapters you need.
   o  De-select Connect at power-on.

img024.png
  • 41 KB
  • P2V008
P2V008


•  Advanced options.
   o  De-select "Power on target machine".
   o  Select "Install VMware Tools on the imported machine".
   o  Select "Remove System Restore checkpoints on destination".

img026.png
  • 46 KB
  • P2V009
P2V009

•  Click NEXT
•  Ready to Complete.
•  Review the summary information.
•  Click NEXT


> Finished P2V on Server side.
This finishes the migration on the Physical server side. In the next section we will work on the VM settings and post P2V tasks.
> P2V post-installation tasks.
Here we will check the VM after P2V and clean some “trash” from the new VM and start software services.
•  First need to connect to the Virtual Center, or ESX host, using a VI Client.


> VM Review Tasks:
Before start the VM review and adjust the virtual hardware and settings depending of the need of the new VM and type of server. (Management, Database, Application, etc.)

•      Before change anything on the new P2V VM, create a VM Snapshot to rollback any wrong set-tings(on comments add
        Initial Sate).
•      Before start the VM adjust the number of NICs(leave all NICs power on, but disconnect for now), CPUs(If you change the
        numbers of CPUs, different from the physical server, don’t forget to change the HAL running the right script).
•      Remove any unnecessary devices such as serial ports, USB controllers, COM ports, floppy drives, etc.
•      Start Windows Server in Safe Mode(F8 on server start).
•      Log on to the virtual machine.
•      Check if virtual machine boots without any booting errors.


> Clean P2V VM:
Here we will clean and adjust the P2V VM from all unnecessary hardware and/or Software and Set-tings.

> Hardware Clean.

The following scripts will clean and set the new VM to work properly:

Go to console and run the scripts.
Run c:\P2V\EE-Post1.bat

This Script will:
1.      Creates a list of all devices that matches the virtual machine.
2.      Compares the list of all devices of the physical machine (created in the previous step "P2V Pre-requirements tasks") with the
          list of all devices that match the virtual machine.
3.      Removes all phantom hardware.
4.      Rescans hardware.
5.      Reboots the  server.


> Software and Networking adjust.

•  Run c:\P2V\EE-Post2.bat
This script will change the registry key for profile problem after P2V in VMware (VMware Article).


•  Run c:\P2V\ EE-Post3.bat
This script will run the vbs script c:\P2V\ Post-Task3.vbs and will Enable Video Hardware Acceleration.

If this P2V is converting HP Proliant hardware you can clean up the HP hardware related drivers, utilities, agents using the HP Proliant Support Pack Cleaner from Guillermo Musumeci.
Or just manually uninstall any HP (or other Hardware management software) Support software.
Note: Don't forget Network Configuration Utility Agent in the Network Adapters.

•  Run the System Configuration Utility to enable the normal services boot.
•  Go to Start Menu and Run > msconfig
   o  For Windows NT and 2000 Servers use the same msconfig.exe from previous pro P2V tasks.

Or go to console and run c:>msconfig
o  On the General tab, Select the "normal startup" option.
   o  Reboot the server.

Logon to the VM again.

•  Go to Start Menu and Run > cmd

c:\>set devmgr_show_nonpresent_devices=1
c:\>devmgmt.msc

  o  Select view > show hidden devices.
  o  Check if there are still unused devices present and uninstall them manually.

•  Run c:\P2V\EE-Post4.bat
     Note: Update the HAL - Only do this task if you changed from multi to uniprocessor.
     Note2: If the physical server is a Windows NT, just follow this Microsoft KB.
•  Reboot your server.

> Finalizing the P2V.
Here we will finalize the P2V and shutdown the physical server and connect the VM.

•  After double check all the previews tasks, shutdown physical server.
•  Use files created in P2V Pre-requirements tasks to add the network settings (IP address, DNSs, etc.).


After updating the network adapter settings, run in console.

c:\route print 
c:\ipconfig /all
                                    
1:
2:

Select allOpen in new window


Check if everything is according the files that you created in the pre P2V tasks.

  •  Check local disks letters (if needed change drive letters to the original values that is in the file Disk_Letters.txt created earlier or
     print screen created).
  •  Compare the values with the files created in the initial P2V Pre-requirements tasks.
  •  In the VM connect all the NICS and reboot the VM server.
  •  Logon to server Test network connectivity from and to the VM.
  •  Test your Application/Database Servers or reconfigure depending on the new settings.

> Storage Tasks:
This section will only be necessary if in the Physical Server has any Storage Disks.
   >  Storage side.
     This section is done on the Storage management by the Storage Team.
     Reconnection of LUNs after successful P2V migration.
•  Identify all LUNs connected previously to the physical server.
•  Remove all the LUNs from physical host Storage Group.
•  Remove physical host from that Storage Group.
•  Remove the Storage Group.
•  Assign all the LUNs to the Storage Group of the ESX cluster that is hosting new Virtual Machine.
•  Assign Host ID for each LUN in new Storage Group.
•  Provide Host ID to the Virtualization Team.
•  Virtualization team has to connect LUNs to the Virtual Machine as a RDM disks.

Roll back procedure after failed P2V migration:
•  Shut down the physical server.
•  Identify all LUNs connected previously to the physical server.
•  Identify SnapView sessions for each LUN.
•  Disconnect LUs from the physical server Storage Group.
•  Roll back SnapView session for each LUN.
•  Reconnect LUNs for the physical server Storage Group.

 > ESX host side:
•  Rescan the Storage connections (on the ESX host in Storage Adapters option).
•  Check if the new Storage LUN is available in the Storage area.
•  Reattach the new LUN to the new VM as a RAW disk.


In the VM settings add a new hard disk.
St001.jpg
  • 46 KB
  • P2V010
P2V010

Choose a RAW disk to add.
St002.jpg
  • 60 KB
  • P2V011
P2V011

In the next screen you can see the RAW disk to add to the VM.
St003.jpg
  • 43 KB
  • P2V012
P2V012

You can choose to hold this RAW disk with the VM (recommended), or you can choose a different Storage to hold the RAW disk.
St004.jpg
  • 42 KB
  • P2V013
P2V013

Use the Virtual compatible mode. With this mode you can snapshot the VM that will include this RAW disk.

Next and Finish adding this RAW disk.
St005.jpg
  • 53 KB
  • P2V014
P2V014


> VM System Operation side:
•  Reattach the RAW disk(s) to the Windows.
•  Rescan disks to add the new RAW disk.
•  Use the same letter disk to add the disk to the server.


Note: When VM is working an in production and the P2V is a success, remove the VM initial state snapshot and any Storage snapshot created for servers with disk LUNs.


> Finishing and Testing the VM (application or database).
To complete the P2V just make some test after the final post-P2V tasks. After this testes the P2V is finish.

Testing Tasks:
1.  Logon to the server using a Domain Account.
2.  Ping Gateway and a DC Server.
3.  Ping from another server the VM IP server.
4.  Open Browser and test internet connection.
5.  Check the Automatic services, if they are all running.
6.  Testing Database and Application Server.
   •  If this server is a Database Server, check Database Services and run Database  Management Tools.
   •  If this server is a Webserver, check if IIS is running and test one or two sites configured in IIS.
   •  If this server is an Application server, run the app to see if you experience any issues.


This finishes this long tutorial about migration P2V for Windows server.

Hope this will be helpful for all the users in future P2V servers

Thank you for reading this

PS: If you have any issues or any type of problems with P2V, just contact me and maybe I can help, or can be an issue that I have encounter in the past and I can help.

Note: I like to thank you Lieven D'hoore and is site, for the help and ideas on P2V and with the pre and post scripts.

Important: Download the P2V Scripts from here
    Asked On
    2010-08-29 at 16:50:25ID3639
    Tags

    P2V

    ,

    Windows Servers

    ,

    VMware

    ,

    vConverter

    ,

    Cold Migration

    Topic

    VMware

    Views
    16628

    Comments

    Expert Comment

    by: jjdurrant on 2010-09-16 at 13:33:41ID: 19484

    Nicely done!

    Expert Comment

    by: VMwareGuy on 2010-09-21 at 06:00:19ID: 19659

    I don't believe P2V scripts are publically available anymore, the P2V assistant was retired a long time ago and I haven't seen where it can be accessed...  

    Author Comment

    by: BestWay on 2010-09-21 at 10:06:24ID: 19669

    Hi

    Sorry i did no understand you question(if is a question)

    The scripts that i provide and have added into this article, are this available.

    Jail

    Expert Comment

    by: Rehman_itends on 2010-12-20 at 03:45:17ID: 22202

    Great !!!!!!!!!

    Expert Comment

    by: llarava on 2011-02-02 at 12:56:54ID: 23421

    Sorry I haven't been able to find the script can someone point me out to them?

    Expert Comment

    by: VMwareGuy on 2011-02-02 at 12:59:43ID: 23422

    Do a search for RVtools. it is a utility that has 100s of scripts, including scripts to help with the P2V clean up process.

    Expert Comment

    by: llarava on 2011-02-02 at 13:08:54ID: 23425

    http://www.robware.net/ is a nice tool but it only seems to report about the VMs.

    Author Comment

    by: BestWay on 2011-02-02 at 13:55:49ID: 23430

    Hi

    If you look at the end of the article is the url to download the scripts.

    http://www.ee-stuff.com/Expert/Upload/getFile.php?fid=7978

    Jail

    Author Comment

    by: BestWay on 2011-02-02 at 14:02:06ID: 23431

    Hi

    RVtools is a tool to check data and information about your host and VMs, Storage etc., and you can extract that information into file, this is not scripts or P2V related.

    Jail

    Expert Comment

    by: VMwareGuy on 2011-02-02 at 17:17:19ID: 23432

    OK, you are correct, mike laveric has a collection of P2V cleanup scrits..

    http://communities.vmware.com/message/301263#301263

    Author Comment

    by: BestWay on 2011-02-03 at 01:43:56ID: 23441

    Hi

    Yes you are correct. My scripts are similar, and I have change some emails with Mike about the scripts and he as send me one more to add into my article. But I have not update the article yet.

    If you go to Mike site you see a comment about this article.

    http://www.rtfm-ed.co.uk/2010/10/15/a-blast-from-the-past-p2v-scripting/

    Jail

    Expert Comment

    by: sinfuldips on 2011-02-13 at 19:06:43ID: 23824

    Hi Guys

    Just a quick question, if I want to perform the same procedure on V2V, does the process remain the same in principle or are there massive changes? Can you direct me to that document if there is one?
    Apologies in advance but as you can understand, I am a novice.

    Regards

    Expert Comment

    by: sinfuldips on 2011-02-13 at 19:54:09ID: 23826

    Also forgot to add, if I want to do a v2v using converter,

    1) will the target VM be able to boot up with the image of the source VM and come up exactly as the source machine or will it need some configuration?
    2) If the 2 VMs, i.e the source and the destination, are on two different networks which are not connected, how to do I make the image accessible. Can I copy the image from the source onto an external HDD and then use that to boot up the destination? Approximately how big will be the image created by Converter?

    I am trying to perform a DR test and I want to check to see if a vm which is a DC on a production network, can be recreated exactly as the same in a separate private network. After a bit of research I have realized that V2V conversion is probably the best way to do this.
    What do you think?

    Regards,

    Dipan

    Author Comment

    by: BestWay on 2011-02-14 at 08:46:24ID: 23834

    Hi sinfuldips

    Please open a question.

    This is article area, not for questions.

    By open a question you can get a better help from many EE experts.

    Jail

    Expert Comment

    by: sinfuldips on 2011-02-14 at 14:57:03ID: 23841

    Hi BestWay

    thanks I will do so.

    Regards,

    Author Comment

    by: BestWay on 2011-02-25 at 02:33:53ID: 24108

    Hi

    I have update the article. Added some notes, and some remarks about some of the tasks.

    Will add more in a couple of days, since I want to 2 new scripts.

    Thank You

    Luciano Patrão

    Expert Comment

    by: sekhar_kiit on 2011-06-09 at 03:00:38ID: 28167

    Hi, We have done p2v for windows NT 4.0 server and now we are facing issue while accessing the share (shared in winNT server) from windows 2003 server using HOSTNAME we are not able to access. but able to access from IP address and FQDN name. what could be the issue.
    Ther is batch file running which uses hostname.

    Expert Comment

    by: bergquistcompany on 2012-03-04 at 06:34:55ID: 44665

    My login works to get here but it says invalid when trying to get to the scripts.  Does anyone know how I can get these?

    Add your Comment

    Please Sign up or Log in to comment on this article.

    Join Experts Exchange Today

    Gain Access to all our Tech Resources

    Get personalized answers

    Ask unlimited questions

    Access Proven Solutions

    Search 3.2 million solutions

    Read In-Depth How-To Guides

    1000+ articles, demos, & tips

    Watch Step by Step Tutorials

    Learn direct from top tech pros

    And Much More!

    Your complete tech resource

    See Plans and Pricing

    30-day free trial. Register in 60 seconds.

    Loading Advertisement...

    Top VMware Experts

    1. hanccocka

      2,402,899

      Genius

      20,820 points yesterday

      Profile
      Rank: Genius
    2. coolsport00

      259,512

      Guru

      0 points yesterday

      Profile
      Rank: Genius
    3. paulsolov

      48,915

      400 points yesterday

      Profile
      Rank: Genius
    4. BestWay

      41,955

      600 points yesterday

      Profile
      Rank: Sage
    5. danm66

      39,761

      0 points yesterday

      Profile
      Rank: Wizard
    6. IanTh

      32,340

      0 points yesterday

      Profile
      Rank: Genius
    7. andyalder

      32,308

      0 points yesterday

      Profile
      Rank: Genius
    8. thinkpads_user

      24,520

      0 points yesterday

      Profile
      Rank: Genius
    9. kevinhsieh

      23,604

      0 points yesterday

      Profile
      Rank: Genius
    10. millardjk

      18,282

      0 points yesterday

      Profile
      Rank: Master
    11. rindi

      17,077

      0 points yesterday

      Profile
      Rank: Savant
    12. CarlWebster

      16,686

      0 points yesterday

      Profile
      Rank: Genius
    13. RickEpnet

      14,468

      0 points yesterday

      Profile
      Rank: Guru
    14. EvertG

      14,300

      0 points yesterday

      Profile
    15. cwstad2

      13,984

      0 points yesterday

      Profile
      Rank: Guru
    16. cdfs

      13,168

      0 points yesterday

      Profile
      Rank: Master
    17. Neilsr

      12,652

      0 points yesterday

      Profile
      Rank: Genius
    18. npsingh123

      11,452

      0 points yesterday

      Profile
      Rank: Master
    19. dkotte

      11,400

      0 points yesterday

      Profile
      Rank: Guru
    20. dlethe

      11,100

      0 points yesterday

      Profile
      Rank: Genius
    21. arnold

      10,782

      0 points yesterday

      Profile
      Rank: Genius
    22. demazter

      10,656

      0 points yesterday

      Profile
      Rank: Genius
    23. Anuroopsundd

      9,724

      0 points yesterday

      Profile
      Rank: Sage
    24. S00007359

      9,676

      0 points yesterday

      Profile
      Rank: Guru
    25. LesterClayton

      9,100

      0 points yesterday

      Profile
      Rank: Guru

    Hall Of Fame