VMware Cloud Community
stuartcallison
Contributor
Contributor

Disassociate host from vCenter Server...

When I used vSphere client to login directly to a host that is being managed by vcenter, there is a button on the summary tab that says "Disassociate host from vCenter Server..." When you hit this button a task starts called Update Management server IP. Is there a way to do this same thing using the vSphere PowerCLI?

Tags (1)
Reply
0 Kudos
11 Replies
LucD
Leadership
Leadership

Can't you just use the Remove-VMHost cmdlet for that ?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
UmeshAhuja
Commander
Commander

Hi,

Go with the below mention link where you will get the answer for your query

http://searchvmware.techtarget.com/Using-PowerShell-and-PowerCLI-to-work-with-host-servers

Thanks n Regards
Umesh Ahuja

If your query resolved then please consider awarding points by correct or helpful marking.
Reply
0 Kudos
stuartcallison
Contributor
Contributor

You are saying connect to the vcenter server and then use remove-vmhost correct? The thing is, as far as the vCenter server is concerned, the host is already removed. I am trying to connect directly to the host and perform the "Disassociate host from vCenter Server..." action so that it no longer believes it is being managed by vcenter.

Reply
0 Kudos
LucD
Leadership
Leadership

Does this mean that the Remove-VMHost didn't complete correctly ?

That remove should normally stop and remove the vpxa agent on the ESX(i) host.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
stuartcallison
Contributor
Contributor

The host is disconnected when the remove-vmhost cmdlet is run on the vcenter server, so it is removed from vcenter, but when you log into the host directly it still shows that it is being managed by the vcenter server until you hit the disassociate button.

Reply
0 Kudos
LucD
Leadership
Leadership

Does it still show that button after a reboot of the ESXi server ?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
LucD
Leadership
Leadership

Just did a quick check with Onyx and the method behind that button is UpdateManagementServerIp.

But that seems to be a private API, I'm afraid.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
stuartcallison
Contributor
Contributor

So does that mean it is not possible with the PowerCLI?

Reply
0 Kudos
LucD
Leadership
Leadership

Correct


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
stuartcallison
Contributor
Contributor

Do you know of any other way to make the host realize that it is not really connected to a vCenter server anymore?

Reply
0 Kudos
LucD
Leadership
Leadership

For ESXi 5 I'm afraid not Smiley Sad


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos