Afgdd
Contributor
Contributor

How to get IP address of vCenter Server?

I want to get IP address of vCenter Server from my plugin. But from vimObjectReferenceService, I only can get host name of vCenter Server (something like vc01.example.local). Is there anyway to get IP address of vCenter Server? Thank you!

0 Kudos
2 Replies
amitkadam10
Contributor
Contributor

Hi Afgdd,

I connect to my LAB VC via powercli.

Once connected if i fire the following command it gives a output from where i can pick up the IP.

===========================

Command : $defaultVIServer |Select Id, Name,Version,User

===========================


Please let me know if this helped.


Regards,

Amit Kadam


0 Kudos
Afgdd
Contributor
Contributor

Hello Amit Kadam

Thank you for your response. However, I want to get vCenter IP address from service layer of a plugin using vSphere Web Client SDK, not powercli

0 Kudos