Configure hostname in VMware ESXi using the cli

Set hostname only

~ # esxcli system hostname set   --host farstar
~ # hostname
farstar.localdomain
~ #
OR
~ # esxcli system hostname set -H farstar
~ # hostname
farstar.localdomain
~ #

Set domain

~ # esxcli system hostname set   --domain farstar.rtfmp.com
~ # hostname
farstar.farstar.rtfmp.com
~ #
OR
~ # esxcli system hostname set -d rtfmp.com
~ # hostname
farstar.rtfmp.com
~ #

Set Fully Qualified Domain Name in one shot

~ # esxcli system hostname set --fqdn farstar.rtfmp.com
~ # hostname
farstar.rtfmp.com
~ #
OR
~ # esxcli system hostname set -f farstar.rtfmp.com

Display hostname using esxcli

~ # esxcli system hostname get
   Domain Name: rtfmp.com
   Fully Qualified Domain Name: farstar.rtfmp.com
   Host Name: farstar
~ #
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s