VMware {code} Community
espennilsen
Contributor
Contributor
Jump to solution

Retrieve guest IP address trough webservice.

Hi.

I am trying to find a way to retrieve a guest's Ip adress trough webservice.

But I cant find any workflow or other means to get this information.

I know this should be possible to get trough VMWare Tools but I cant find any documentation supporting this.

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
Burke-
VMware Employee
VMware Employee
Jump to solution

Assumming you have already retrieved a Virtual Machine object and assigned the object a variable name of "vm", the following code in an action or Scriptable task will retrieve the guest IP address:

var guestIP = vm.guest.ipAddress;

You can then return the guestIP variable as your output from that workflow/action.

Visit me at for vCenter Orchestrator tips and tutorials

If my answer resolved or helped you, please mark it as Correct or Helpful to award points. Thank you!

Visit http://www.vcoteam.info & http://blogs.vmware.com/orchestrator
for vRealize Orchestrator tips and tutorials - @TechnicalValues on Twitter

View solution in original post

0 Kudos
3 Replies
ProPenguin
Hot Shot
Hot Shot
Jump to solution

Wether you are using the vcenter client, or the web access, if you click on the server and then go to the summary tab. The IP address is listed on that tab. Hope this helps.

0 Kudos
Burke-
VMware Employee
VMware Employee
Jump to solution

Assumming you have already retrieved a Virtual Machine object and assigned the object a variable name of "vm", the following code in an action or Scriptable task will retrieve the guest IP address:

var guestIP = vm.guest.ipAddress;

You can then return the guestIP variable as your output from that workflow/action.

Visit me at for vCenter Orchestrator tips and tutorials

If my answer resolved or helped you, please mark it as Correct or Helpful to award points. Thank you!

Visit http://www.vcoteam.info & http://blogs.vmware.com/orchestrator
for vRealize Orchestrator tips and tutorials - @TechnicalValues on Twitter
0 Kudos
admin
Immortal
Immortal
Jump to solution

Hi,

The above approach by Burke is used to fetch the VM's IP address. I would just like to add that please make sure you have VMware Tools installed since VM's guest OS prop can only be retrieved if tools are installed.

Regards,

Angela