Automation

 View Only
  • 1.  Disassociate host from vCenter Server...

    Posted Jan 19, 2012 07:32 PM

    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?



  • 2.  RE: Disassociate host from vCenter Server...

    Posted Jan 19, 2012 08:12 PM

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



  • 3.  RE: Disassociate host from vCenter Server...

    Posted Jan 19, 2012 08:37 PM

    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.



  • 4.  RE: Disassociate host from vCenter Server...

    Posted Jan 19, 2012 08:56 PM

    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.



  • 5.  RE: Disassociate host from vCenter Server...

    Posted Jan 19, 2012 09:06 PM

    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.



  • 6.  RE: Disassociate host from vCenter Server...

    Posted Jan 19, 2012 09:56 PM

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



  • 7.  RE: Disassociate host from vCenter Server...

    Posted Jan 19, 2012 10:33 PM

    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.



  • 8.  RE: Disassociate host from vCenter Server...

    Posted Jan 20, 2012 04:50 PM

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



  • 9.  RE: Disassociate host from vCenter Server...

    Posted Jan 20, 2012 05:10 PM

    Correct



  • 10.  RE: Disassociate host from vCenter Server...

    Posted Jan 20, 2012 07:40 PM

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



  • 11.  RE: Disassociate host from vCenter Server...

    Posted Jan 20, 2012 08:38 PM

    For ESXi 5 I'm afraid not :smileysad:



  • 12.  RE: Disassociate host from vCenter Server...

    Posted Jan 19, 2012 08:37 PM

    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