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.

Spread the love!

Scott Forehand

Scott Forehand is an accomplished systems architect, engineer, and administrator with over a decade of experience designing and managing virtual environments, networks, storage and server infrastructures and operations with a proven ability to create and automate solutions to improve productivity, reliability and performance. He has achieved multiple certifications in virtualization, networking, cloud, storage and other technologies, and is honored to be a VMware vExpert in 2018.