How To: P2V of vCenter Server

I was recently tasked with upgrading a legacy vCenter environment to cater for an upgrade to Trend Deep Security Manager. As I was reviewing the environment I noticed that one of the vCenter servers was a physical server running on an IBM HS22 blade. This server is part of a linked-mode vCenter and as the second vCenter was virtualized it caught me by surprise that this one wasn’t. Before beginning the work to upgrade vCenter from 5.0 to 5.5 and all its component I decided to virtualize the physical vCenter server to make management easier down the road and to eliminate the reliance on physical hardware outside of the ESXi hosts themselves.

As all ESXi hosts were being managed by the vCenter I was trying to convert I had to remove on host from the production cluster and isolate it so that it could be managed independently and could be used as the destination for the P2V in the vCenter Standalone Converter.

 

PREPARATION:

Step 1: Download vCenter Standalone Converter 5.5 from VMware site

1.1: Go to https://my.vmware.com/web/vmware/info/slug/infrastructure_operations_management/vmware_vcenter_converter_standalone/5_5 and download the installation file.

Step 2: Isolate an ESXi host to use as the destination of the conversion

2.1: Put the ESXi host in maintenance mode. Then right-click and Disconnect from vCenter. It will appear in italics and with a red X through it.

2015-04-01_09h21_49

2.2: Log on directly to the ESXi host using the root account

2015-04-01_09h22_24

2.3: Exit maintenance mode and ensure you don’t get a warning that the host is being managed by an instance of vCenter

2015-04-01_09h23_15

Step 3:  Backup all databases to backup location

3.1: Log onto the SQL server (in this instance it’s the vCenter server) and open SQL Management Studio

2015-04-01_09h30_20

3.2: Stop the vCenter services before capturing the backup

2015-04-01_09h47_17

3.3: In SQL Management Studio select the database, right-click and select Tasks -> Back Up.

2015-04-01_09h51_23

3.4: Next select Full backup and add a destination for the backup file.
2015-04-01_09h46_46

3.5: Click Ok to begin backup. The backup will then complete successfully

2015-04-01_09h52_55

3.6: Once all the databases are backup up continue with the next steps. You can also now stop all of the SQL services in preparation for the P2V

2015-04-01_10h06_24

 

Step 4: Backup the SSL certificates

4.1: From the C drives: C:\ProgramData\VMware\VMware VirtualCenter\SSL

2015-04-01_09h33_10

Step 5: Backup the ADAM instance DATA

5.1: Click Start, right-click Command Prompt, then click Run as administrator to open a command prompt.

2015-04-01_09h34_55

5.2: Run the command:

dsdbutil

At the dsdbutil: prompt, run the command:

activate instance VMwareVCMSDS

Run this command to open the ifm prompt:

ifm

At the ifm: prompt, run this command for the type of installation media that you want to create:

create full F:\ADAM_Backup\VMwareVCMSDS

2015-04-01_09h38_385.3: Verify that the file has exported

2015-04-01_09h40_25

 

Step 6: Verify the local login account

6.1: Verify that you can access the server via a local admin account. This will make sure that once you p2V that you can access the server again. Log off the server and log on again with the administrator account. If you can’t connect then create a new local user account

 

CONVERSION:

Step 7: Convert the server using VMware Converter

7.1: Select Convert machine

2015-04-01_10h13_38

7.2: Select Powered-On machine and add the details of the remote machine. Use the domain credentials to connect. Click Next

2015-04-01_10h16_11

7.3: Select Yes to Continue

2015-04-01_10h16_41

7.4: If you get an alert about not being able to install the agent you’ll need to do the following on the physical vCenter server:

2015-04-01_10h20_46

  • Check the server services is running
  • Check the firewalls have been turned off
  • Disable UAC

If the above is ok then copy the converter agent file from your computer to the client computer. The agent can be located here:

C:\Program Files (x86)\VMware\VMware vCenter Converter Standalone\VMware-Converter-Agent.exe

7.5: On the physical vCenter server run the installation of the agent

2015-04-01_10h22_47

7.6: Click Next

2015-04-01_10h23_05

7.7: Click Next

2015-04-01_10h23_26

7.8: Accept the terms and click Next

2015-04-01_10h23_40

7.9: Click Next

2015-04-01_10h23_53

7.10: Leave the default port and click Next

2015-04-01_10h24_05

7.11: Click Install

2015-04-01_10h24_28

7.12:  Click Finish

2015-04-01_10h24_54

7.13: Now go back to Standalone converter and click Next. You will get a pop-up about certificates. Click Ignore.

2015-04-01_10h25_30

7.14: Select the VMware Infrastructure virtual machine and enter the details of the ESX host disconnected from vCenter earlier. Enter the root credentials and click Next

esx-host-convert

7.15: When you get prompted for the certificate click Ignore

2015-04-01_10h30_42

 

7.16: Verify the name you want to give the server. It should have the same name as the current server. Any other VMs that reside on the connected ESX host will also appear here. Click Next.

2015-04-01_10h31_27

7.17: Select a datastore of where to place the new VM. You can also select a resource pool if required. In this case I’m going to stick the VM on the root level. Also, select the virtual machine version. This will be dictated by the version of ESXi running on the host. Click Next

2015-04-01_10h32_48

7.18: Click Edit beside Device and on the Memory tab select 8GB instead of the current amount

esx-host-convert1

7.19: You can change the amount of CPU here also but as per the recommendation it’s best to wait until the conversion has been completed and edit the VM files afterwards

2015-04-01_10h42_21

7.20: In this instance we have 3 NICs, 2 NICs that are teamed using Broadcom software. Select the network to place them on, I’ve chosen Isolated Network for the conversion phase and disable Connect at power-on. This will mean there won’t be a clash on the network and give you time to fix up the teamed NICs so only one NIC actually exists. Set the controller type to VMXNET3

2015-04-01_10h45_03

7.21:  Click Edit on Services. Change all of the SQL and vCenter services to be disabled on the destination services tab so they do not start automatically on boot up. They can be started manually once the VM has been reconfigured and optimized

2015-04-01_10h47_527.22: Select Advanced Options and select Synchronize changes and run immediately after cloning

2015-04-01_10h49_01

7.23: On the Post-Conversion tab select the following:

  • Power On destination machine
  • Power Off source machine
  • Install VMware Tools on the destination virtual machine
  • Remove System Restore checkpoints on destination

Reconfigure destination virtual machine

2015-04-01_10h50_497.24: Select Next. Verify that the summary is correct and click Finish

2015-04-01_10h51_47


7.25: This will then begin the job

2015-04-01_10h53_107.26: Keep an eye on the Log highlights to see what is going on. You can also log on directly to the ESXi host to see what is happening to the VM. I would advise having a KVM console open to the physical server to see when it shuts down and also a console to the VM from the vSphere client to see when it comes online.  Depending on the size of the disks the conversion can take quite some time

2015-04-01_12h43_08

 

Step 8: Post Virtualization Cleanup

8.1: Once the conversion has taken place you will can log onto the converted server using the local admin account and remove the following:

  • USB Controller
  • Audio devices
  • Any hardware specific software
  • Floppy drive

And then also break the NIC teaming and remove unnecessary vNICs.

8.2: Boot the server and in the BIOS disable the:

  • Serial devices
  • COM devices
  • LTP devices
  • Floppy Disk Controllers

8.3: Tidy Windows Device Manager, start command prompt as an administrator and

run the “set devmgr_show_nonpresent_devices=1” and then “start devmgmt.msc”

  • Look for disabled devices; evaluate the need for each device and resolve as required.
  • Look for devices with warnings; evaluate the need for each device and resolve as required.

8.4: Remove Audio devices, if any.

8.5: Attach the vNIC to the network, set all the services to start automatically and reboot the server

8.6: Next log into vCenter as your normal account. Right-click on the host that vCenter is residing upon and click Connect

2015-04-01_13h51_49

8.7: Click Yes

2015-04-01_13h52_498.8: Newly virtualized server now appears in the system

2015-04-01_13h54_50And now your vCenter server has been converted from a physical server to a virtual one with no impact to any of your end users. 


4 comments

  1. Pingback: How to P2v existing vcenter – yet another sysadmin blog

  2. Pingback: vCenter Server Upgrade Finished | nujakcities


Leave a Reply to cTux Cancel reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s