VMware Cloud Community
rcrcrc
Contributor
Contributor

How to migrate management (vmk0) to a new IP+subnet with host on a vDS

This seems like it should be so easy, right?  I simply want to move vmk0 to a new subnet.

But it seems virtually impossible to do.  If I use the vDS "manage hosts" option, it lets me change the IP, but not the default gateway, so of course the change rolls back.

Of course, if I change the default gateway before the IP, it also rolls back. 

I tried adding a new vmk port with the new IP, selected it for management, and THEN changed the default gateway, and... it still didn't work.

The only way to make it work was to revert the host to a standard switch on the console, then I could reconnect and re-add it to the vDS.  This is a particularly poor solution for migrating a number of hosts.

Seems like the "Migrate vmk0" dialog should have an option for changing default gw.

Thoughts?  Am I missing an obvious way to do this?

0 Kudos
4 Replies
Dee006
Hot Shot
Hot Shot

Have you tried by disabling the rollback feature?

rcrcrc
Contributor
Contributor

I wasn't aware that rollback could be disabled (thanks for the tip!) but it wouldn't really do any good because I'd lose communication and hence my ability to change the gateway.  From what I can tell, the UI needs a way to change IP and gateway in one action, which doesn't seem to be possible.

0 Kudos
muckmuck
Contributor
Contributor

Hello-  I have struggled with this several times also but finally came up with this process to migrate our hosts to new IP/VLAN.  Hope this help you or anyone else who has had issues with this.

  1. Verify that VLAN for the new IP address you will be using is presented to the trunked ports of your dvSwitch NICs.
  2. Put ESXi host in Maintenance Mode.
  3. Remove one of the Nic’s that has both vlans trunked to it from your dvSwitch.
  4. Create a new Standard Switch, check “use for Management Traffic” using the NIC above with VLAN ID for the new IP address you will be using.
  5. Add vmkernel with new IP to the new Standard Switch.
  6. Update DNS servers with hosts new management IP.
  7. Flush DNS on vCenter server(s), your PC and anything else that might point at it.
  8. Migrate old vmkernel to new standard switch created in step #2 using vsphere client connected to vCenter.
  9. Connect to ESXi host directly using vSphere client and delete the old vmkernel with old address.
  10. Make sure the ESXi host is still connected.  ***You will probably have to reconnect the ESXi host in vCenter one or more times.***
  11. In vCenter vSphere client, select the dvSwitch you want to move the new vmkernel to and select “Manage Virtual Adapter”, “add”, “migrate” and check the box for just the vmkernel adapter.  **Wait about 5 min to make sure the ESXi host doesn’t disconnect again.**
  12. Remove the Standard Switch you created in Step #3, wait a couple of minutes and click “refresh” to verify that the switch is gone.
  13. Add the NIC back to the Distributed Switch you removed it from in Step #2.
  14. Remove ESXi host from Maintenance Mode and verify all is good.
0 Kudos
impranayk
Enthusiast
Enthusiast

- Create one more management network on new vSwitch with second NIC using New IP+Subnet.

- Migrate this vSwitch Port Group to vDS.

- Remove existing management network vSwitch.

-------------------------------------------------------------------------
Follow me @ www.vmwareinsight.com
Please consider marking this answer "correct" or "helpful" if you found it useful

Pranay Jha | Blog: http://vmwareinsight.com
vExpert 2016/2017, VCAP5-DCD/DCA, VCP5-DCV, VCA-Cloud, VCE-CIA, MCSE, MCITP
0 Kudos