In my function, i have fetched all my needed VM's from the vCenter - when looping through them i would like to fetch the cluster that the virtualmachine is running under. Is this possible without further lookups to the vCenter API for each VM?
vcenterResponse := []mo.VirtualMachine{}
err = v.Retrieve(ctx, []string{"VirtualMachine"}, []string{"summary", "name", "network", "guest", "config", "resourcePool"}, &vcenterResponse)
if err != nil {
return
}
for i, vm := range vcenterResponse {
...
}