Hello everyone,
Not sure if this is the correct forum or not, but I am trying to pull all of the host information from a selected VM instance in C#.
For example, I have the following code:
IList<VMware.Vim.EntityViewBase> vms = vmwareClient.FindEntityViews(typeof(VMware.Vim.VirtualMachine), null, null, null);
foreach (VMware.Vim.EntityViewBase tmp in vms) {
VMware.Vim.VirtualMachine vm = (VMware.Vim.VirtualMachine)tmp;
}
I understand that vm is a type of VirtualMachine, but I am also wanting to reference values provided inside the object type of HostSystem.
How do I enumerate a HostSystem object referencing my VirtualMachine object? The reasoning in looking up the Host information from the VirtualMachine object is if I pull the list of VMs from a vCenter instance, the VM could reference that of a different host.
Thanks in advance!
-ToTheCloud