Friday, August 22, 2008

Another Mile Stone with P2V

I got an assignment to P2V old Dell hardware. Server was running critical application and was behaving wired. We planned to P2V this old guy. This old guy was running 4 CPU with 2GB of memory. It has NIC teaming as well (will tell latter what problem faced because of this).

I decided to do P2V using CD boot method (I did this in past and was quite comfortable with this). I called Datacenter folks and ask to check

1. It has CD ROM so that I can boot using Convertor ISO.

2. Machine has console access so that once machine get booted with CD.

Guys told it does not have any KVM Raritan connection or any remote management facility. I was kind of stuck and started reading blogs. I started looking at VC and finally I found plugin which was already available

clip_image002

I enable this plugin under installed tab and was trying to figure out how I will use it ☺ and will discuss this in detail below. I was planning how I would be going for this approach since this would be fist time I would be using “VMware Converter Enterprise”. I wanted to make sure that I am talking all the precaution so I got Mr. Eric Siebert’s for my rescue.

Precaution :a) Shut down all the un-wanted services.

b) Turn off the Antivirus.

c) Run ipconfig/all and make a note of all information about IP address.

d) Make a determination for amount of CPU or RAM which will go with virtual

machine while cloning.

Start Performing cloning physical machine:

1. Select the host where you want to place converted machine and right click on the host and select “import machine”. Now I got to understand where the plugin is working ☺

clip_image004

2. Wait till it does its magic clip_image006 and finally you get the screen where the magic (I am really excited with this new tool) start which will guide step by step

clip_image008

3. Select “next ” and choose the option as highlighted.

clip_image010

Note : Check rest of the option it give breathing space even for its rival ☺. This show how much VMware has respect for its rival as well. Can same honor will be given to VMware as well? I doubt.

4. Select Next and then provide the required information

clip_image012

5. It will try to connect and then prompt for option if you would like to install the converter agent on the remote machine. Also make a note that this agent install would reboot the remote host if it is running version below win2k. I usually select default one. Once you hit yes it will start installing agent. I have tested on my laptop and it freeze momentarily☺

clip_image014

6. It will bring the screen where it sees all the drive and give you the option to select for the P2V purpose. New disk space can be changed if required. In this case have to squeezed the space to 20GB from 75GB

clip_image016

Before I forget log for all these activity can be found under

C:\Documents and Settings\All Users\Application Data\VMware\VMware Converter Enterprise\Logs as vmware-converter-agent*

7. Select next, it will ask to double confirm the destination.

clip_image018

8. Hit next and it will ask for the virtual machine name. Same name can be given for which P2V is happening. Because we are going to shut down the physical and then power on this virtual. Also you can not select different datacenter.

clip_image020

9. Select next and it will ask for datastore where the VMDK or disk file will be placed. It will verify space availability and then proceed further with that.

clip_image022

10. Hit next and then it will detect the number of NIC. Here we can change the NIC which virtual server will have and what VLAN it should be going. Compare to standard converter this feature is cool because there were no way to change the VLAN(Don’t remember).

clip_image024

11. Hit next and it will prompt if you would like to install VM tools. My recommendation is do not install the VMtools at this point as it may conflict with other drivers.

clip_image026

12. Hit next and then select if you would like to do it now or schedule it for next sometime latter. I liked this feature which give me choice if I am trying to P2V some production machine.

clip_image028

13. Hit next and here you have the option if you want to “power on” the machine when P2V is completed. Select NO to be on the safer side because there is lot many “Post P2V” related activity.

clip_image030

Sit tight till it finishes up.

POST P2V ACTIVITY

1. Once P2V is over we right click and select setting for the virtual machine

clip_image032

2. Remove all unwanted hardware because of P2V. Virtual just need base hardware as shown below. Also sometime if we are migrating windows2000 it will install controller as LSI logic but make sure buslogic is selected or else BSOD will be generated.

clip_image034

3. Once these cleanup is done then power on the machine with NIC disconnected. The reason I am doing this because actual machine is still powered ON.

clip_image036

4. Once these setting is done power on the machine and login with local admin and password. If there is any NIC teaming exist then break the team. The reason for this is NIC driver get migrated as part of P2V and if we uninstall driver without breaking this team than it may land up in additional troubleshooting.

5. These NIC driver are hidden when it is P2Ved. To do this go to a CMD prompt and type SET DEVMGR_SHOW_NONPRESENT_DEVICES=1 and then DEVMGMT.MSC and then select Show Hidden Devices. Delete any old grayed out hardware.

6. If you change from a multi-processor system to a uni-processor system you need to manually change the HAL on the Windows server after the conversion. To do this go into Device Manager after the machine first boots and discovers it's new hardware and then click on Computer then right-click on the processor and select Update Driver. Then select Install from specific location and then Don't search I will choose the driver to install. Then select show All compatible hardware and select the appropriate processor. For example, if you went from a dual cpu to a single cpu then select ACPI uni-processor PC instead of ACPI multi-processor PC. You will need to reboot once you change this. To verify what HAL you are using you right-click your hal.dll in c:\windows\system32 and select the Version tab and select Internal Name and it should say halmacpi.dll for multi-processor acpi and halacpi.dll for uni-processor acpi.

7. Next remove any vendor specific applications/drivers. For example on a HP server you should go to Add/Remove programs and remove any HP management agents, survey utility, array config utility, version control agent, etc.

Power On The Virtual Machine.

1. Shut down the physical machine. Make sure ping get timed out.

2. Install the VMtools on the virtual machine

clip_image038

3. Configure IP address on virtual machine and then connect the NIC.

clip_image039

4. Reboot the VM and when it is back mission should have been accomplished.

Converter Best Practices

Found this in the recently posted "Server Migrations with VMware Converter" presentation from VMware TSX and modified it based on my experiences http://www.vmware-tsx.com/download.php?asset_id=48

1. Agent Installation Location

• Locally: Install Converter and agent directly on source machine if converting directly into ESX Server

• Remotely: Connect to source machine over network to install agent

2. Agent Installation

• Use local administrator account

• Avoid domain accounts that have restrictive policies

• Allow reboot for Windows NT 4.0 and 2000 sources

3. Machine Preparation

• Do not deactivate services or harden security

    > Workstation service

    > Server service

    > TCP/IP NetBIOS Helper service

    > Volume Shadow Copy service (Windows 2003 or XP)

• Ensure sufficient free disk space (at least 200MB)

• Mirrored or striped volumes across multiple disks should be broken

• Dynamic disks with utility partitions should use cold cloning

• Disable Windows Simple File Sharing (Windows XP only)

• Disable anti-virus software

• Defrag hard disks

• Shutdown any un-needed Windows Services

• Clean-up any temporary files and un-needed data

• Run chkdsk

• Keep users off if possible

• Power off VM if not using hot cloning

• VCB VM exports need editing prior to import

    > Edit virtual disk filenames inside .vmx

    > Rename filenames for .vmdk files to match those listed in .vmx

    > Edit index .vmdk file to change references to span files

4. Network Preparation

• Open TCP/UDP ports 139, 445, and 902 (Converter 3.0.0) or 443 (Converter 3.0.1)

• Open network ports between source and destination

    > Alternative is to create a VM visible to source, copy VM files to location visible to destination, and import VM

• Use FQDN to connect to both source and VI3

5. Converter Preparation

• Run on OS greater than or equal to source if source is

    > VM and powered off, or

    > Symantec Livestate System Image

6. Cloning

• Starter edition limitations and workarounds

    > Cannot remote hot clone directly into VI3

         - Workaround 1: install Converter on source machine

         - Workaround 2: select standalone VM as destination, and then import VM to VI3 using two steps

    > Cannot run multiple tasks concurrently

         - Workaround: run multiple copies of Converter

    > Cannot cold clone

         - Workaround: create new VM, use third-party cloning application such as Ghost, and run Converter configure

• Do not resize volume for fastest clone speed (block-level copying)

• Resize volumes if source disks have inefficient utilization (resorts to file-level copying)

• Use cold-cloning disk-based cloning (not volume-based) for non-Windows systems

• Use hot cloning for Windows NT 4.0 systems to avoid NTFS upgrade

• Destination needs to be writeable

7. Configure

• Avoid cloning utility partitions

• Check partition numbers in boot.ini

• Automatic “Install VMware Tools” option is only available for ESX Server VMs

8. Clean-Up Prior to Power On

• Edit VM settings according to desired goal

    > Number of vCPUs

    > Add/Delete USB devices

    > Add/Delete Serial and parallel devices

    > Remove Floppy drive if not needed

    > SCSI controller type (BusLogic vs. LSI Logic)

• OEM source may require license activation

    > SMBIOS.reflectHost = “TRUE” in .vmx may avoid reactivation

    > Requires destination host to have same hardware

9. Clean-Up After Power On

• Detect hardware

    > VMware Tools installation may hang if hardware not detected

• Allow reboots to occur

    > Detect hardware and VMware Tools installation

• Verify HAL and change if necessary

• Remove non-present old hardware

    > CMD prompt type set DEVMGR_SHOW_NONPRESENT_DEVICES=1

    > Next type DEVMGMT.MSC and select Show Hidden Devices

    > Delete any old grayed out non-present hardware

10. Guest Troubleshooting

• Blue screen after powering on

    > Start Windows in Safe Mode and uninstall hardware-specific applications or services

    > Attach VM to “Helper VM” to remove hardware-specific drivers or to correct the boot.ini

• No keyboard/mouse

    > Select Workstation/Server VM instead of ESX Server, then import VM to ESX Server

    > Use PS/2 keyboard/mouse on source

• Display problems

    > Uninstall PC Anywhere prior to installing VMware Tools

Converter FAQ

What are the requirements for Converter?

For cold cloning the minimum memory requirements is 264MB, the recommended memory is 364MB. Converter uses a RAM disk while cold cloning and will not work with less then 264MB. Also the operating system on which Converter runs must be equal to, or greater, than the operating system on the source machine. For example if your source machine is running Windows 2003 and you are running Converter remotely, you must run it on a Windows XP or 2003 machine. You will not be able to run it on a Windows 2000 machine. If you run Converter on 2003 or XP you should be able to convert any operating system since they are the latest operating systems.

What platforms can Converter be installed on?

VMware Converter 3 can be installed on the following platforms: Windows XP Professional, Windows 2003 Server, Windows 2000 Professional, Windows 2000 Server and Windows NT SP6+ (IE5 or higher required)

What import formats does Converter support?

Source formats supported include: Physical Machines running supported OS, Microsoft Virtual PC (version 7 and higher), Microsoft Virtual Server (any version), Symantec Backup Exec System Recovery images (also Ghost 9 or higher), VMware Workstation 4.x virtual machine (compatible with VMware GSX Server 3.x), VMware Workstation 5.x virtual machine (compatible with VMware Player and VMware Server 1.x), VMware ESX Server 3.x, VMware ESX Server 3.x (when managed by VirtualCenter 2.x), VMware ESX Server 2.5.x (when managed by VirtualCenter 2.x)

What export formats does Converter support?

Destination formats supported include: VMware Workstation 4.x virtual machine (compatible with VMware GSX Server 3.x, ESX Server 2.5.x), VMware Workstation 5.x virtual machine (compatible with VMware Player and VMware Server 1.x), VMware ESX Server 2.5.x (when managed by VirtualCenter 2.x), VMware ESX Server 3.x (when managed by VirtualCenter 2.x), VMware ESX Server 3.x Note: VMware ESX Server 2.5.x when managed by VirtualCenter 1.x and VMware ESX Server 2.5.x unmanaged are not supported

What are the supported guest operating systems?

The following 32-bit guest operating systems are fully supported by VMware Converter 3: Windows NT, Windows 2000 Professional, Windows 2000 Server, Windows XP Professional, Windows 2003 Server

The following 64-bit guest operating systems are fully supported by VMware Converter 3: Windows XP Professional, Windows 2003 Server

Support for the following guest operating systems is Experimental. VMware Converter 3 can clone source images containing these operating systems, but the destination virtual machine may or may not work without additional configuration after import. In particular, if the source image contains unsupported hardware, you may need to modify the configuration of the destination virtual machine before using it: Linux, Windows NT 3.x, Windows ME, Windows 98, Windows 95, MS-DOS

What TCP/IP ports are used by Converter?

Converter 3.0.0 uses the following ports:

• Converter application to remote physical machine - 445 and 139

• Converter application to VirtualCenter Server - 902

• Converter application to ESX Server 3.x - 902

• Physical machine to VirtualCenter Server - 902

• Physical machine to ESX Server 3.x - 902

Converter 3.0.1 uses the following ports:

• Converter application to remote physical machine - 445 and 139

• Converter application to VirtualCenter Server - 443

• Converter application to ESX Server 3.x - 443

• Physical machine to VirtualCenter Server - 443

• Physical machine to ESX Server 3.x - 443

*** If you are using Converter 3.0.1 make sure you do not have a web server using port 443 while running Converter

When you select VirtualCenter as a destination and then chose a ESX host, Converter will first make a connection to VirtualCenter and then the ESX host, so you will need to make sure these ports are not being blocked for both the VirtualCenter server and ESX server

What Windows Services need to be running for Converter to work properly?

The Windows Server and TCP/IP Netbios Helper services must be running for Converter to work properly. Also for Windows 2003 Servers the Volume Shadow Copy service must not be disabled (can be Manual or Automatic)

What should I do before running Converter?

First, once you install Converter on the source system to do a Hot clone, you must reboot the system before running it. Once you reboot, make sure the Vmware Converter service is started and running before you begin. Next shutdown any un-needed Services, the less Services running the better your chances for a successful conversion. This includes backup agents, virus scanners, applications, etc.

What types of servers should not be converted?

In general, Active Directory domain controllers, database servers (SQL/Oracle), Exchange servers and any servers that have sensitive applications are not good candidates for conversions. If you do try and convert these types of servers the best method is to cold-clone them. If you must hot-clone them make sure all applications and services are shutdown before starting the conversion. Database servers are particularly sensitive to corruption when being converted. It is also best if you do not change the drive sizes when converting these servers. If you re-size hard drives this changes the copy method that Converter uses to migrate the data to the destination. Domain controllers have been known to have USN rollback problems after being converted. See the following Microsoft knowledge base articles for more information: http://support.microsoft.com/kb/885875/ and http://support.microsoft.com/kb/875495/ and also http://support.microsoft.com/kb/888794/en-us

What is the difference between the Starter and Enterprise edition of Converter?

The differences are Enterprise includes support, the ability to cold-clone with the boot CD, able to do multiple simultaneous conversions and perform remote conversions

How do I get a Enterprise license for Converter?

Vmware Converter Enterprise is available at no additional cost to existing and new VirtualCenter Management Server customers and P2V Assistant customers, with valid support and subscription contracts. First go to http://www.vmware.com/download/licensing.html and click on the Manage VMware Product Licenses link. If you are entitled to Converter licenses you will see Vmware Converter 3.0 Enterprise listed once you log in. Once you activate the license and download the license file you can go to http://www.vmware.com/download/converter/ and click on the Enterprise Edition link to download the ISO file for cold-cloning. The installation program for hot-cloning is the same for Starter and Enterprise editions. Once you select a license file in Converter it will unlock the Enterprise features. One thing to note is that the license file you download for Converter does not work with the License Manager server. Even though it is in the same format as the ESX licenses the License Server will not recognize it. To use your Converter license file simply copy it to the server that Converter is installed on and launch the Converter application and select Administration, Licensing Information and click Add License and browser and select your Converter license file

Is there support available for Converter?

Support is available for the Starter edition but needs to be purchased on a per incident basis ($90 per incident). If you have the Enterprise edition support is included as part of the VirtualCenter Management Server. Also the Vmware Converter forum is a great resource for answering Converter questions and solving problems

Can I convert Linux servers with Converter?

The Converter documentation states: “Experimental support only is available for Linux-based physical to virtual machine conversions using the Vmware Converter BootCD (cold cloning) if the source physical machine has SCSI disks.” Some people have had success converting Linux machines, others have not. If Converter does not work on your Linux machine you can try a commercially available conversion product from Platespin called PowerConvert which has full Linux support.

Why are ESX and VirtualCenter grayed out as destinations when I run Converter?

If you are using the Starter edition you must run it on the physical server that is being converted for ESX Server and VirtualCenter to be available as destinations. If you do not run it on the server being converted then only the Vmware standalone virtual machine option is available. Enterprise edition does not have this restriction

2 comments:

LandOfGoodBread said...

Good notes. I tried P2V of a Windows 2000 Pro machine, and the virtual machine will not launch explorer.exe. I'm using Task Manager to run cmd.exe, from which I can start most applications (e.g. Firefox, desk.cpl, ...) Any experience with this problem?

Vikash Kumar Roy said...

Hummm looks like OS got currpted. I wont rule out this as P2V issue. Would you mind giving it one more try ? This time please stop all the services