VMware Cloud Community
network_user
Enthusiast
Enthusiast

Changing Management IP/Gateway for the ESXi host

Hello,

I have a ESXi host with management and VMnetwork running on the same network. I want to change the management IP/gateway to a different network. I did see some articles saying that I can do that via the console of ESXI host by going into the network configuration settings and changing it there. The question I have is once I do that will the ESXi host automatically create a new vSwitch and add appropriate nic (nic connected to mgmt sw) on it for the management network to work?

Right now the management network and VM network both are on vSwitch0 (eg:10.10.10.x) sharing vmnic1 and vmnic5

I want to move the management network to 192.168.2.x connected to vmnic0. How will ESXi host know that it needs to use vmnic 0 for management connection?

I don't want to just try it and then lose connectivity to the host. I am connecting to the host remotely and it is hosting production traffic.

Also do i have to reboot the server for the new changes to take effect?

Please advise.

Thanks

Reply
0 Kudos
3 Replies
bayupw
Leadership
Leadership

Hello

Changing ESXi Management IP won't affect the VM network as long as you do not change/configure anything on the vSwitch level that may affect the VM Network.

e.g. adding VLANs if your current configuration has no VLANs configured, vSwitch load balancing policy, adding/removing vmnic.

Even if you can't access the ESXi Management Network, your VMs would still be able to connect to its network.

Do you have access to server's Out Of Band Management to access the console/DCUI?

You can change via SSH/command line, vSphere Client, or DCUI.

But I would prefer to have DCUI access in case you misconfigured the IP or you want to revert back, you can still do it via DCUI.

See this link: Back To Basics: Managing VMware ESXi 5.5 Direct Console User Interface (DCUI) | VMware SMB Blog - VM...

DCUI-ipconfig.png

Bayu Wibowo | VCIX6-DCV/NV
Author of VMware NSX Cookbook http://bit.ly/NSXCookbook
https://github.com/bayupw/PowerNSX-Scripts
https://nz.linkedin.com/in/bayupw | twitter @bayupw
Reply
0 Kudos
Texiwill
Leadership
Leadership

Hello,

Using the current management approach, such as vCenter .NET or Web Client, create a vSwitch that has an uplink of vmnic0. Once you have that created, you can then migrate your management network for each host to vmnic0. You can do this one of two ways, first create a new vmkernel port attached to a new portgroup on the new vswitch that is a Management vmkernel, add the new IP address, subnet, etc to that vmkernel. Do this for all hosts first.

Then unregister and register each host in vCenter using the NEW IP address. Once you have it registered under the new IP address, delete the old vmkernel port for management from the hosts.

Remember during this transition vCenter needs to reach both networks. After the migration you should not need to the old network anymore.

You can also use the CLI but you will still need to unregister/register your ESXi hosts.

I have never found a way around this when using a NEW network address.

Best regards,
Edward L. Haletky
VMware Communities User Moderator, VMware vExpert 2009, 2010, 2011,2012,2013,2014

Author of the books 'VMWare ESX and ESXi in the Enterprise: Planning Deployment Virtualization Servers', Copyright 2011 Pearson Education. 'VMware vSphere and Virtual Infrastructure Security: Securing the Virtual Environment', Copyright 2009 Pearson Education.

Virtualization and Cloud Security Analyst: The Virtualization Practice, LLC -- vSphere Upgrade Saga -- Virtualization Security Round Table Podcast

--
Edward L. Haletky
vExpert XIV: 2009-2023,
VMTN Community Moderator
vSphere Upgrade Saga: https://www.astroarch.com/blogs
GitHub Repo: https://github.com/Texiwill
Reply
0 Kudos
muckmuck
Contributor
Contributor

Hello-  The following steps worked for me.  If your ESXi host/management IP's are on a dvSwitch you won't be able to change in vSphere client or using the ESXi console (it will let you change the IP but it won't work and you will have to roll back).

  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, 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.
Reply
0 Kudos