Real Life Scenario – Migrate a vCenter Server VM


Imagine the following scenario, you have upgraded almost all your ESX hosts to vSphere, to ESX4U1 precisely, you have configured them in a different way that is different vSwitch names, different service consoles and VMkernel. Remains one ESX3.5U2 in you environment and it runs one single VM, your vCenter server actually which has been upgraded to support vSphere. vMotion won’t work because there are too much differences between this host and ESX4 hosts so question now is how do I migrate my vCenter server VM to an ESX4 host?

  1. From a VM running into the new environment, open 2 Putty sessions, one to the old remaining ESX server and one to a new ESX4 host. If you cannot SSH in (disable) you may try through the console with tools like HP iLO or Dell DRAC.
  2. From the same VM, you need to access the vSphere Web Access of the ESX host where your vCenter server VM will migrate to.
  3. Shutdown the vCenter server VM.
  4. Back on the VM where you have your 2 Putty sessions.
    1. On the old ESX3.5 host type in the following command: vmware-cmd -s unregister /vmfs/volume/<vm-cfg-path> This will remove the guest from inventory in your VMware cluster.
    2. Next, on the new ESX4.0 host, type in the following command to register the virtual machine: vmware-cmd -s register /vmfs/volume/<vm-cfg-path>
    3. Now lets bring back up that VM. On the new ESX4.0 host type in the following command: vmware-cmd /vmfs/volume/<vm-cfg-path> start
  5. Here is where your Web Access is mandatory, the VM will restart but a message from your ESX4 host will put the reboot on hold. So connect to the vSphere Web Access, select the vCenter server VM from the list and answer the question that is ‘This virtual machine has been noved or copied?’. Select ‘Moved’ and the VM will keep on going with the boot up process.

I did not find a command line tool or a parameter to add to my vmware-cmd start command to 1) respond automatically to the question 2) pass the answer to the host. If anybody knows how to do it please post a comment.
Also this is the kind of scenario where an ESXi would be no help because of the lack of a Web Access, assuming there is no command line parameter to help out in such situation of course.

Advertisements

About PiroNet

Didier Pironet is an independent blogger and freelancer with +15 years of IT industry experience. Didier is also a former VMware inc. employee where he specialised in Datacenter and Cloud Infrastructure products as well as Infrastructure, Operations and IT Business Management products. Didier is passionate about technologies and he is found to be a creative and a visionary thinker, expressing with passion and excitement, hopefully inspiring and enrolling people to innovation and change.
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a 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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s