This commit is contained in:
2
main.go
2
main.go
@@ -127,7 +127,7 @@ func processVMs(client *govmomi.Client) error {
|
||||
// Determine cluster based on runtime host of VM based on https://github.com/vmware/govmomi/issues/1242#issuecomment-427671990
|
||||
for _, host := range hsList {
|
||||
if host.Reference() == *vm.Summary.Runtime.Host {
|
||||
fmt.Printf("host %s matches, host parent %s\n", host.Name, host.Parent)
|
||||
//fmt.Printf("host %s matches, host parent %s\n", host.Name, host.Parent)
|
||||
|
||||
var cluster mo.ManagedEntity
|
||||
err = pc.RetrieveOne(ctx, *host.Parent, []string{"name"}, &cluster)
|
||||
|
Reference in New Issue
Block a user