Change ESXi 5.0 hostname with esxcli

November 15, 2011 — 44 Comments

Yes another post about esxcli, what can I say I’m studying very hard for my VCP5 and from time to time this kind of unknown information, at least for me, arise and I believe it can be useful for some of you.

Again we are going to make use of the system namespace.

~ # esxcli system hostname
Usage: esxcli system hostname {cmd} [cmd options]
Available Commands:
  get                   Get the host, domain or fully qualified name of the ESX host.
  set                   This command allows the user to set the hostname, domain name or fully qualified domain name of the ESX host.
~ #

First task of course is to get current hostname.

~ # esxcli system hostname get
   Domain Name: vjlab.local
   Fully Qualified Domain Name: esxi5.vjlab.local
   Host Name: esxi5
~ #

Next change the hostname, but you should check before what options are at your disposal by getting the command help.

~ # esxcli system hostname set --help
Usage: esxcli system hostname set [cmd options]
Description:
  set                   This command allows the user to set the hostname, domain name or fully qualified domain name of the ESX host.
Cmd options:
  -d|--domain=<str>     The domain name to set for the ESX host. This option is mutually exclusive with the --fqdn option.
  -f|--fqdn=<str>       Set the fully qualified domain name of the ESX host.
  -H|--host=<str>       The host name to set for the ESX host. This name should not contain the DNS domain name of the host and can only contain letters, numbers and '-'. NOTE this is not
                        the fully qualified name, that can be set with the --fqdn option. This option is mutually exclusive with the --fqdn option.
~ #

Interesting, you can change the short hostname, the domain or the fully qualified domain name. Take into account that --fqdn option is mutually exclusive with the others.

We are going to try all of them.

Domain:

~ # esxcli system hostname set --domain=jreypo.local
~ #
~ # esxcli system hostname get
   Domain Name: jreypo.local
   Fully Qualified Domain Name: esxi5.jreypo.local
   Host Name: esxi5
~ #

Short hostname:

~ # esxcli system hostname set --host=esxi5-2
~ #
~ # esxcli system hostname get
   Domain Name: jreypo.local
   Fully Qualified Domain Name: esxi5-2.jreypo.local
   Host Name: esxi5-2
~ #

Fully qualified domain name:

~ # esxcli system hostname set --fqdn=esxi5.vjlab.local
~ #
~ # esxcli system hostname get
   Domain Name: vjlab.local
   Fully Qualified Domain Name: esxi5.vjlab.local
   Host Name: esxi5
~ #

Juanma.

About these ads

44 responses to Change ESXi 5.0 hostname with esxcli

  1. 

    Thanks for the great tip!

    -Ken

  2. 

    Hello just wanted to give you a quick heads up. The text in your
    content seem to be running off the screen in Firefox.
    I’m not sure if this is a formatting issue or something to do with browser compatibility but I thought I’d post to let you know.
    The style and design look great though! Hope you get the issue resolved soon.
    Many thanks

  3. 

    We need to follow our intuitions, but also not get caught up in our emotions either.
    Practice is needed to “get it” but once you get it you need never look back.
    Doron Alon is the author of The Bible and the Law of Attraction. At a certain point,
    you will simply manifest those things you desire with very little to no effort, simply because you have habituated the ability to feel, think, and be as you need to in order to manifest.
    It’s a big topic of course, but the bit that we’re concerned with here is the
    fact that on a very basic level, everything is connected.

  4. 

    You could want to look at these abovementioned intracies even though you
    have options. The moment you have observed a law firm, discuss with him or her about the various arguments shown below.
    http://Desty.Iisweb.Co.kr/xe/?mid=pub&page=1&document_srl=50215

  5. 

    Good post! We are linking to this particularly great article on our site.
    Keep up the good writing.

  6. 

    I just like the helpful information you provide to your articles.
    I’ll bookmark your blog and test once more right here regularly.
    I am quite certain I will be told lots of new stuff proper right
    here! Good luck for the next!

  7. 

    Lets begin with stating among the information about this excellent revolutionary weight-reduction plan capsule and
    metabolism price booster. Individuals who
    have underlying medical condition should also consult a physician before taking this diet pill.
    Indeed Adiphene weight reduction pill is the answer for those who always goes on food regimen however can’t endure the
    meals carving hunger and the irritability gave rise by dieting.

  8. 

    What’s up friends, pleasant article and fastidious arguments commented
    at this place, I am actually enjoying by these.

  9. 

    Still others work at the cellular level to initiate healthy changes in our bodies.
    This alone offers it some credit score as a authentic contender
    within the eating regimen complement arena; at the moment oversaturated with
    poor high quality diet products. Uptil now no
    individual has actually been captured with any negative effects.

  10. 

    Hey There. I found your blog using msn. This is an extremely well written article.
    I’ll make sure to bookmark it and return to read more of your useful information. Thanks for the post.
    I’ll definitely return.

  11. 

    Thanks for some other fantastic post. Where else may just anybody get that type
    of information in such an ideal method of writing?
    I have a presentation next week, and I’m on the look
    for such info.

  12. 

    On a 3rd offense, you will probably go to jail, depending on the judge.
    This Article Content is taken from this Website: Hype is an author of arrested in jacksonville website.
    The only point which has to be taken into consideration is appointment of outstanding and a capable
    lawyer.

  13. 

    Extremely fascinating article

  14. 

    Fantastic piece of writing, I liked the earphone xperia go bit

  15. 

    I seldom discuss these posts, but I assumed this on deserved a well done you

  16. 

    Exceptionally fascinating object

  17. 

    Hi there, after reading this awesome paragraph i am as well glad to share my know-how here
    with friends.

  18. 

    I’m very happy to discover this great site. I want to to thank you for your time due to this wonderful read!!

    I definitely liked every part of it and I have you book marked to see new things on your site.

  19. 

    Excellent short article, I loved the northstar marine electronics part

  20. 

    I hardly ever comment on these items, but I thought this on deserved a well done you

  21. 

    Most auto repair shops provide guaranty for the jobs.
    Finally, you don’t have to visit a franchised dealership
    to have regular maintenance, like an oil change. This is rather off-putting
    and also the main reason why experts suggest vehicle owners to do a proper research before
    hiring the services of a repair company.

  22. 

    I very rarely discuss these articles, but I assumed this on deserved a well done

  23. 

    I very rarely comment on these posts, but I assumed this on deserved a big thankyou

  24. 

    I searched for the article title and discovered this, great
    read

  25. 

    Wonderful piece of writing, I enjoyed the allied electronics
    uk bit

  26. 

    I searched for the article title and discovered
    this, great read

  27. 

    Well I searched for the article title and discovered this, didn’t think i’d
    find my answer

  28. 

    Well I searched for the article title and found
    this, great read

  29. 

    Extremely fascinating piece

  30. 

    Hello, important information and an fascinating article post, it is going to be exciting if this is still the case in a few months time

  31. 

    I very rarely discuss these articles, but
    I thought this on deserved a well done you

  32. 

    Well I searched for the article title and discovered this,
    great read

  33. 

    Extremely interesting piece

  34. 

    Well I searched for the article title and discovered this, great read

  35. 

    I hardly ever discuss these posts, but I thought this on deserved
    a big thankyou

  36. 

    Thanks for finally writing about >Change ESXi 5.0 hostname with esxcli Juanma’s Blog <Loved it!

  37. 

    A camcorder is a video recorder and video camera in the
    same time. It provides recording customization and captures parameters adjustment in order to help users record professional video in good quality.

    Currently they are the only company giving wages to professional gamers.

  38. 

    Great blog here! Also your site loads up fast! What web host are you
    the usage of? Can I get your associate hyperlink on your host?

    I want my site loaded up as quickly as yours lol

  39. 

    Keep these few things. If a product especially when you shop online.
    ‘ He was first invented in 1855. Com and pictured grosfillex bahia chaise lounge below.
    You can keep it grosfillex bahia chaise lounge
    the reality that teak and mangrove. You do not varnish or gloss paint of any house, on your outdoor space looking good.

  40. 

    Thanks for the marvelous posting! I seriously enjoyed reading it, you could be a
    great author.I will always bookmark your blog and
    may come back sometime soon. I want to encourage you to continue your great posts, have a nice day!

  41. 

    Simply want to say your article is as amazing. The clarity onn your publish is simply nice and
    i can assume you’re knowledgeable in this subject. Well
    along with your permission let mee to grab your feed to keep updated with coming near near
    post. Thank yoou 1,000,000 and please keep up tthe gratifying work.

  42. 

    You ought to be a part of a contest for one of the finest blogs on the web.
    I’m going to highly recommend this site!

  43. 

    Thanks for finally writing about >Change ESXi 5.0 hostname with esxcli Juanma’s Blog
    <Liked it!

Trackbacks and Pingbacks:

  1. Some ESXi useful links « a Linux Rat in the Lab - January 7, 2013

    […] Change ESXi Hostname with esxcli: nice link here. […]

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