Forgot to unregister vcenter ip

  • 21 December 2018
  • 7 replies
  • 1407 views

I forgot to unregister the vcenter & changed the IP of vcenter. Now able to see new vcenter to register, however cannot remove old vcenter registration info.

7 replies

Userlevel 3
Badge +6
If you want to unregister vCenter from Prism .
this is the way to do so .

1
Log into the Prism web console.
Click the gear icon in the main menu and then select vCenter Registration in the Settings page.
2
A message that cluster is already registered to the vCenter Server is displayed.
Type the administrator user name and password of the vCenter Server in the Admin Username and Admin Password fields.
3
Click Unregister.
If the credentials are correct, the vCenter Server is unregistered from the cluster and a relevant message is displayed in the Tasks dashboard.
Userlevel 3
Badge +6
since old ip is not reachable you won't able to unregister from the prism , you need to forcefully remove from the CVM , (https://portal.nutanix.com/kb/4492)

  1. Method 1: Using nCLI Unregister the vCenter Server. If you receive the "the vCenter Server does not exist anymore" alert, use a random user name and password.
  2. nutanix@cvm$ ncli ms unregister ip-address=vcenter_ipadmin-username=username admin-password=passwordport=port_number
  3. Replace vcenter_ip with the IP address of vCenter Server.
  4. Replace username and password with the user name and password of vCenter Server or a random one if you receive the "the vCenter Server does not exist anymore" alert.
  5. Replace port_number with the port number of the vCenter Server.
  6. Register the vCenter Server. Note that your vCenter port can be other than 443.
  7. nutanix@cvm$ ncli ms register ip-address=vcenter_ipadmin-username=username admin-password=passwordport=port_number
  8. Replace vcenter_ip with the IP address of vCenter Server.
  9. Replace username and password with the user name and password of vCenter Server or a random one if you receive the "the vCenter Server does not exist anymore" alert.
  10. Replace port_number with the port number of the vCenter Server.
  11. Verify if the vCenter Server registration is successful.
  12. nutanix@cvm$ ncli ms list-management-server-info
Note: You might see data related to the old the vCenter Server in the vpxa.cfgfile. In this case, do one of the following:

  1. Method 2:Log on to the ESXi host as the root user with SSH.
  2. Open the /etc/vmware/vpxa/vpxa.cfg file by using a text editor and replace the serverIp parameter with the new IP address of the vCenter Server. Save the file and exit.
  3. Make the changes persistent.
  4. root@host# /sbin/auto-backup.sh
  5. Note: ESXi regularly runs a script to make any changes persistent by writing them to the bootbank.
  6. Restart the management agents on the ESXi host.
  7. root@host# /etc/init.d/hostd restart
  8. root@host# /etc/init.d/vpxa restart
  9. Restart the VMware vCenter Server service.
  10. Verify if the vCenter Server registration is successful.
  11. nutanix@cvm$ ncli ms list-management-server-info
  12. The Prism web console should now display the correct information.
  13. Method 3:From the vSphere Client, right-click the ESXi host and click Disconnect.
  14. From the vSphere Client, right-click the ESXi host and click Reconnect. If the IP address is still not correct, go to step 3.
  15. From the vSphere Client, right-click the ESXi host and click Remove.
  16. Caution: After you remove the host from vCenter Server, entire performance data for the virtual machines and the host is lost. If you are using dvSwitches (Distributed Virtual Switches) you must add the dvSwitch object again to the host using the following steps:
  17. Go to New > Add Host.
  18. Enter the information used for connecting to the host.
  19. Verify if the vCenter Server registration is successful.
  20. nutanix@cvm$ ncli ms list-management-server-info
  21. The Prism web console should now display the correct information.
For more information, see the VMware KB article 1001493.
Userlevel 1
Badge +12
I just performed the same thing (reassigned an ip address to my vCenter appliance before unregistering from Nutanix cluster in Prsim). However, when I run the ncli command to unregister the old entry, teh task simply errors out and doesn't remove the vCenter. I've tried a real username/password and a generic one as well as changing the port from 443 to 80. Same results... this is on AOS 5.5.7.1 with vCenter 6.0.
Userlevel 1
Badge +12
I ended up following method 3 above and it improved the issue in my cluster. I was able to 'register' the updated vCenter however the old one is still listed - both in Prism and in ncli. It doesn't appear as important however since the cluster now has the correct vCenter registered.
Userlevel 4
Badge +19
@mandg

Can you check if the old vCenter IP exists in "/etc/vmware/vpxa/vpxa.cfg" file on all ESXi host?
Userlevel 1
Badge +12
Hi sandeepmp - yes, I did find that the vpxa.cfg was pointing to the old ip address but was unable to resolve this with method #2 listed in this thread - however method #3 did work for me. Thanks!
since old ip is not reachable you won't able to unregister from the prism , you need to forcefully remove from the CVM , (https://portal.nutanix.com/kb/4492)

  1. Method 1: Using nCLI Unregister the vCenter Server. If you receive the "the vCenter Server does not exist anymore" alert, use a random user name and password.
  2. nutanix@cvm$ ncli ms unregister ip-address= vcenter_ipadmin-username=username admin-password=passwordport=port_number
  3. Replace vcenter_ip with the IP address of vCenter Server.
  4. Replace username and password with the user name and password of vCenter Server or a random one if you receive the "the vCenter Server does not exist anymore" alert.
  5. Replace port_number with the port number of the vCenter Server.
  6. Register the vCenter Server. Note that your vCenter port can be other than 443.
  7. nutanix@cvm$ ncli ms register ip-address= vcenter_ipadmin-username=username admin-password=passwordport=port_number
  8. Replace vcenter_ip with the IP address of vCenter Server.
  9. Replace username and password with the user name and password of vCenter Server or a random one if you receive the "the vCenter Server does not exist anymore" alert.
  10. Replace port_number with the port number of the vCenter Server.
  11. Verify if the vCenter Server registration is successful.
  12. nutanix@cvm$ ncli ms list-management-server-info
Note: You might see data related to the old the vCenter Server in the vpxa.cfgfile. In this case, do one of the following:

  1. Method 2:Log on to the ESXi host as the root user with SSH.
  2. Open the /etc/vmware/vpxa/vpxa.cfg file by using a text editor and replace the serverIp parameter with the new IP address of the vCenter Server. Save the file and exit.
  3. Make the changes persistent.
  4. root@host# /sbin/auto-backup.sh
  5. Note: ESXi regularly runs a script to make any changes persistent by writing them to the bootbank.
  6. Restart the management agents on the ESXi host.
  7. root@host# /etc/init.d/hostd restart
  8. root@host# /etc/init.d/vpxa restart
  9. Restart the VMware vCenter Server service.
  10. Verify if the vCenter Server registration is successful.
  11. nutanix@cvm$ ncli ms list-management-server-info
  12. The Prism web console should now display the correct information.
  13. Method 3:From the vSphere Client, right-click the ESXi host and click Disconnect.
  14. From the vSphere Client, right-click the ESXi host and click Reconnect. If the IP address is still not correct, go to step 3.
  15. From the vSphere Client, right-click the ESXi host and click Remove.
  16. Caution: After you remove the host from vCenter Server, entire performance data for the virtual machines and the host is lost. If you are using dvSwitches (Distributed Virtual Switches) you must add the dvSwitch object again to the host using the following steps:
  17. Go to New > Add Host.
  18. Enter the information used for connecting to the host.
  19. Verify if the vCenter Server registration is successful.
  20. nutanix@cvm$ ncli ms list-management-server-info
  21. The Prism web console should now display the correct information.
For more information, see the VMware KB article 1001493.

What if the vCenter was deleted and it is still registered on Prism?

I don't think method 1 or 2 works. Is there another way to remove it manually?

I couldn't find anything online so I'll probably re-foundation my lab environment.

Reply