code: func (vm *VirtualMachine) IsActive(ctx context.Context) (bool, error) {
  	vmMoList, err := vm.Datacenter.GetVMMoList(ctx, []*VirtualMachine{vm}, []string{"summary"})
  	if err != nil {
  		klog.Errorf("Failed to get VM Managed object with property summary. err: +%v", err)
  		return false, err
  	}
  	if vmMoList[0].Summary.Runtime.PowerState == ActivePowerState {
  		return true, nil
  	}
  
  	return false, nil
  }
docs: // IsActive checks if the VM is active.
  // Returns true if VM is in poweredOn state.