VMware Cloud Community
rpedregon
Contributor
Contributor
Jump to solution

Physcal hostname of a VM guest

Hello Community, I am as new as new can be to vRealize Orchestrator. I am trying to pull the name of the physical host that a VM is hosted on. I have searched the googles and I can't find the property. If anyone can offer any assistance on this I would greatly appreciate it.

thanks!

Raul

0 Kudos
1 Solution

Accepted Solutions
iiliev
VMware Employee
VMware Employee
Jump to solution

// vm variable of type VC:VirtualMachine contains the virtual machine object

var name = vm.runtime.host.name;

System.log("host name of VM: " + name);

View solution in original post

0 Kudos
2 Replies
iiliev
VMware Employee
VMware Employee
Jump to solution

// vm variable of type VC:VirtualMachine contains the virtual machine object

var name = vm.runtime.host.name;

System.log("host name of VM: " + name);

0 Kudos
rpedregon
Contributor
Contributor
Jump to solution

Thank you so much for that answer Ilian! thats exactly what I needed.

0 Kudos