Skip to main content

How to Change the IP Address of an ESXi Host via ESX CLI

I recently had a colleague reach out with a need to change the IP address of an ESXi host without access to the GUI. I thought it might be useful to outline the steps here, in case it’s helpful for someone else.

Changing the IP address of a host is actually pretty straight forward with ESX CLI. Before you get started, list all of the VMkernel NICs using this command:

esxcli network ip interface ipv4 get

That will return a list of all of the VMkernel interfaces and their details. Now you can change the IP address of the VMKernel adapter:

esxcli network ip interface ipv4 set -i vmkX -I <IP_ADDRESS> -N <SUBNET_MASK> -t static

And that’s it, you’re all done. You’ll lose connection to the host and need to SSH back in, but the host will have the new IP address.

  • Latest Posts
Senior Infrastructure Engineer , Topgolf

Scott is an experienced professional and recognized leader specializing in the design and implementation of enterprise virtualization, enterprise storage, server infrastructures and operations. A self-starter able to work both independently and in a team-oriented environment, Scott has a proven ability to create and automate solutions to improve productivity, reliability and performance. Throughout his professional career, Scott has proven successes implementing technology and service improvement initiatives and has a demonstrated ability to think strategically about business, create technical definition around objectives in complex situations, develop solution strategies, motivate and mobilize resources, and deliver end-to-end technology solutions. Scott has achieved multiple industry recognized certifications in virtualization, networking, cloud, storage and other technologies, and is honored to be a VMware vExpert in 2018, 2019 and 2020.

 

 

Spread the love!