Migrating vCenter

As it turns out, migrating the vCenter Server Appliance was not as straight forward as I thought. This was mostly because I didn’t think about how the process would work, and just assumed that the Veeam Quick Migration feature would save me. Spoilers, it didn’t, everything broke, and now I’m writing this up.

In brief, everything broke because the live migration functionality depends on vCenter working (because Veeam itself points at vCenter), and when vCenter goes down to be migrated, Veeam can’t hook into vCenter. So… don’t migrate the vCenter Server Appliance with Veeam Quick Migration.

Before we get into how I performed the migration, I ran into a particular network issue. The vCenter virtual port was unavailable, which is problematic. This is because I’m using a vSphere Distributed Switch (vDS), vCenter was down, and the vDS virtual port simply wasn’t available - it may have resolved itself if I waited as in theory this shouldn’t happen. However, I came across a solution that uses ephemeral port groups to provide a work around. Thanks to Chris Wahl for making a blog post on it.

The Migration

Take a Backup

Backup the vCenter Server Appliance, just in case you somehow nuke it. Please. I don’t care how. You could use the Veeam Backup & Replication Console.

Export vCenter

  1. Log In to the vCenter Server Appliance Management Interface.
  2. Shut down vCenter. Right click the VM -> Power -> Shut Down Guest OS.
  3. Log into the ESXi Host that the vCenter VM is on.
  4. Under Virtual Machines, right click the VM -> Export.
  5. You’re about to download a number of files, ensure popups are allowed from the host IP or FQDN. Check all the options, and click Export.
  6. You may need to click OK for each file it wants you to download.
    If you max out your available sockets the browser will appear to hang - a download will need to finish before another can start. Your downloads might take a bit depending on the size and your network.

Import vCenter

  1. Log into the ESXi Host that you want the vCenter VM on.
  2. Under Virtual Machines, click Create / Register VM.
  3. Select Deploy a virtual machine from an OVF or OVA file.
  4. Click Next.
  5. Enter the name of your vCenter VM.
  6. Drag all the files you downloaded into the designated area (or click on the area, and select all of the files).
  7. Click Next.
  8. Select your storage.
  9. Click Next.
  10. Select your deployment options. This is where you can pick your ephemeral-management port, if you decided to do that.
  11. Click Next.
  12. Click Finish.
  13. Wait for the upload to complete, and boot the VM if you didn’t enable auto start.

Import Issues

On step 12, you might get an error message saying “A required disk image was missing”. I received this message and it turned out to be the ISO image attached via the emulated CD/ROM. To fix this, you’ll have to edit the Virtual Machine and make sure there’s no ISO images attached to it, then run through the steps again.

While the files are uploading, you should have a task per file to be uploaded. If you don’t have that and it’s a single task, it won’t work. I’m not sure what went wrong here, but you’ll need to start from scratch and run through all of the steps again.

Cleanup

Once you’ve confirmed the migration was successful and everything is working as intended, you should clean up a little bit by removing the old vCenter VM from the old Host.

  1. Log into the ESXi Host where the old vCenter VM resides.
  2. Delete vCenter. Under Virtual Machines, right click the VM -> Delete -> Delete.

Migration Issues

503 Service Unavailable

After exporting and importing, vCenter never really came back up and was throwing a 503 Service Unavailable error. I found a post on fixing the vCenter 503 Error which I stepped through, but it didn’t resolve my issue. So I shut down vCenter, and booted it again. That fixed this problem for me.

References