vCenter

 View Only
Expand all | Collapse all

HOW TO change the IP of a esxi host in Vcenter (complex issue).

  • 1.  HOW TO change the IP of a esxi host in Vcenter (complex issue).

    Posted Feb 12, 2021 02:26 PM

    Hi,
    In my Vcenter I have 1 esxi host listed.
    It is by ip addresss, not dns name.
    If the esxi host changed IP address: how do I change it in vCenter to match it.

    I want to change the 10.19.203.3 to 10.19.80.100

    philjans_0-1613139570612.png

     

    If I right click on it: the ip itself is un-editable.
    If I try to "add a host": I get told "the DB qa-ssd01 is in conflict with another existing db in the database center who has the same URL ds:///vmfs... but it is saved on a storage system physically different..."


    If you wonder, the original reason of the need can be found here: https://communities.vmware.com/t5/VMware-vCenter-Discussions/Weird-Vcenter-ESXi-ip-mixed-up-after-a-firewall-in-between-was/m-p/2828707#M42149

    version 6.5.0.32000



  • 2.  RE: HOW TO change the IP of a esxi host in Vcenter (complex issue).

    Broadcom Employee
    Posted Feb 12, 2021 04:50 PM

    Hi  ,

    Please change the IP address from direct console of ESXi host--> https://kb.vmware.com/s/article/2084629 



  • 3.  RE: HOW TO change the IP of a esxi host in Vcenter (complex issue).

    Posted Feb 15, 2021 06:12 PM

    Hi,
    This procedure is to change the ip address of the esxi host.
    But I need a procedure to change the ip address of the esxi host that VCENTER sees

    The ip of the esxi host never change and do not need to change.
    But Vcenter sees the esxi host  10.19.203.3 when in fact, it is and has always been 10.19.80.100
    How can I change in vcenter this ip?

    thanks for the info



  • 4.  RE: HOW TO change the IP of a esxi host in Vcenter (complex issue).

    Posted Feb 16, 2021 01:24 PM

     
    Any other options before I delete and re-add the esxi to vcenter?
    Also, why would a simple firewall rule with Natting would makes Vcenter change the ip address of a esxi  and no way to get it back to the right ip any other way?

    Which MINIMAL ports are required for vcenter to talk to the esxi? I would like to reput a nat from 203.3 to the correct ip 80.100 and see if vcenter "light-up"? I know the heartbeat is 902 but that's it.
    If 80 and 443 are required, which I dought since the first NAT issue did not include them, then it would be impossible since the FW needs those two to stay attributed to it-self.
    tx



  • 5.  RE: HOW TO change the IP of a esxi host in Vcenter (complex issue).

    Posted Feb 16, 2021 03:05 PM

    The ip address your references under hosts and clusters isn't the esxi hosts IP, its the name of the esxi host in the inventory. Any modification to the hostname or IP that requires that to be updated needs to have the host removed and readded like mentioned here

     

    https://kb.vmware.com/s/article/1010821

     

     

    There used to be a Perl script out there that helped with this, but the  website is not longer around and I don't have a copy, 



  • 6.  RE: HOW TO change the IP of a esxi host in Vcenter (complex issue).

    Broadcom Employee
    Posted Feb 16, 2021 03:05 PM

     ,

    vCenter or ESXi won't change the IP address unless a external API has triggered to vC. If the ESXi host address is changed, vC would also reflect the same. If it's just the vC where the host IP address is incorrectly reported, then a database cleanup would be required and I would not recommend that now. Since it is a single host, remove and reconnect would be a better option.

    Certain ports are mandatory --> https://kb.vmware.com/s/article/1005189 

    Note: If in case, you are using NAT between the vCenter Server system and ESXi/ESX hosts, it is an unsupported configuration



  • 7.  RE: HOW TO change the IP of a esxi host in Vcenter (complex issue).

    Posted Feb 16, 2021 07:19 PM

    Hi,
    I can confirm you that it is vcenter you change the "name" or "ip" showing in vcenter. No one has access to it and I did not.
    If you'd like, you can test it in your lab.
    have a vcenter in an environnement.
    Connect in it a esxi using the esxi ip address.
    put a esxi in another network.
    Have a firewall in between with a rule to allow traffic between the 2.
    Had natting to the rule.
    Now the Vcenter will list the esxi as the Firewall ip instead of the real esxi IP and you won't be able to reconnect even after removing the NAT.

    Anyhow: I removed the esxi from the inventory and re-added it and it fixed the issue. (needed to reconfigure a lot of configs but ... it worked).
    Thank you all guys



  • 8.  RE: HOW TO change the IP of a esxi host in Vcenter (complex issue).

    Posted Feb 16, 2021 07:42 PM

    Glad to hear it! Please consider marking the thread with a solution.



  • 9.  RE: HOW TO change the IP of a esxi host in Vcenter (complex issue).



  • 10.  RE: HOW TO change the IP of a esxi host in Vcenter (complex issue).

    Posted Feb 15, 2021 06:13 PM

    Hi Amansapra19:
    The like is a page not found...



  • 11.  RE: HOW TO change the IP of a esxi host in Vcenter (complex issue).
    Best Answer

    Posted Feb 15, 2021 05:29 PM

    If you're trying to make the host appear in vCenter as the DNS name versus IP you could always disconnect it from vCenter and remove it from inventory, then re-add it using the DNS name instead. You'll have a little clean up work to do like re-organize the VMs into folders, if you had it sorted previously.



  • 12.  RE: HOW TO change the IP of a esxi host in Vcenter (complex issue).

    Posted Feb 15, 2021 05:30 PM

    Of course, in this process execute your IP change too.



  • 13.  RE: HOW TO change the IP of a esxi host in Vcenter (complex issue).

    Posted Feb 15, 2021 06:15 PM

    Hi 1:
    That would be my last results. It would work but I am trying to avoid the "little cleanup" .



  • 14.  RE: HOW TO change the IP of a esxi host in Vcenter (complex issue).

    Posted Feb 15, 2021 06:20 PM

    I think what you are looking at in the inventory is the Hostname for ESXi host. Try checking/modifying the Hostname for ESXi using: https://www.vladan.fr/5-ways-to-change-hostname-of-your-esxi-host/



  • 15.  RE: HOW TO change the IP of a esxi host in Vcenter (complex issue).

    Posted Feb 15, 2021 06:20 PM

    Just remove the host from vcenter and readd it as the new IP address.



  • 16.  RE: HOW TO change the IP of a esxi host in Vcenter (complex issue).

    Posted Feb 15, 2021 07:10 PM

    Yeah, you're trying to change the vCenter Inventory Name. The articles everyone is posting is how to change the hostname and/or IP of the ESX server, which doesn't accomplish what you're trying to do. I believe you're going to need to remove from inventory and re-add using the correct IP or hostname, my friend.



  • 17.  RE: HOW TO change the IP of a esxi host in Vcenter (complex issue).

    Posted Feb 15, 2021 07:11 PM

    If you're PowerCLI saavy, you could always get a folder location of the VMs on that particular host and use that data to move them back to their folder structure once you've re-added the host correctly.



  • 18.  RE: HOW TO change the IP of a esxi host in Vcenter (complex issue).

    Posted Feb 15, 2021 07:18 PM

    Just chopped this up really quick if you wanted to use it:

     

    To obtain the VM's and their folder location:

    $vmList = Get-VMHost [your host here] |Get-VM | Select Name, Folder

    To move the VM back to their folder location after you re-add the host to vCenter:

    ForEach ($vm in $vmList) { Move-VM $vm.Name -InventoryLocation $vm.Folder }