Thursday, July 31, 2014

Change ESXi Hostname/IP when using a vSphere Distributed Switch (VDS)

Recently, I had a client that wanted to re-organize their ESXi servers.  They wanted all the IP’s nicely lined up and the host names changed.

 

But they were also using a VDS. This was my solution.

 

The only way I know of to accomplish this is to remove the host from the cluster and re-add it. Because the host is part of a VDS, you have to remove it from the VDS first before you can remove it from the cluster.

I had previously setup the cluster to use Host Profiles – THIS IS IMPORTANT!  It will save tons of time.

These steps are for the vSphere Client.

So…here are the steps:

  1. Put the host into maintenance mode.
  2. Host->Configuration->vSphere Distributed Switch->Manage Physical Adapters->Remove one adapter (you do have more than one right?!)
  3. vSphere Standard Switch->Add Networking->Virtual Machine Type->Click through to Finish (we are going to migrate the VMK port, so we don’t need a new one)
  4. vSphere Distributed Switch->Manage Virtual Adapters-><the vmk# port> –>Migrate->The vSwitch you just created->enter the right VLAN!
  5. vSphere Distributed Switch->Manage Physical Adapters->Remove other physical ports
  6. Home->Networking->DVSwitch->Hosts Tab->right-click the host in maintenance mode->Remove from vSphere Distributed Switch
  7. Hosts and Clusters->Right Click the host in maintenance mode->Remove
  8. Go to the KVM console of the host and change the IP and hostname
  9. Back to the vSphere client->Cluster->Add host
  10. Host->Attach Profile (Manage Profile)
  11. Host Profiles->Apply Profile
  12. Host Profiles->Check Compliance
  13. Exit Maintenance mode

That should do it!

No comments: