vmware-scripts icon indicating copy to clipboard operation
vmware-scripts copied to clipboard

Could not establish trust relationship error get-vsanversion

Open mmohr1 opened this issue 5 years ago • 2 comments

Hey William, when running the Get-VSANVersion function I'm getting the error below. I checked to make sure the PowerCli Config was set to Ignore for InvalidCertificateAction. Is this something you've seen before?

$results = $vchs.VsanVcClusterQueryVerifyHealthSystemVersions($cluster_view)

Exception calling "VsanVcClusterQueryVerifyHealthSystemVersions" with "1" argument(s): "Could not establish trust relationship for the SSL/TLS secure channel with authority 'VC_NAME'." At line:1 char:1

  • $results = $vchs.VsanVcClusterQueryVerifyHealthSystemVersions($cluste ...
  •   + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
      + FullyQualifiedErrorId : SecurityNegotiationException
    

mmohr1 avatar Jul 09 '19 15:07 mmohr1

Hm, I've not seen this before. Is the TLS certificate on your vCenter Server valid and not having any issues? Are you able to run the default vSAN cmdlets w/o issue or just using the function?

lamw avatar Jul 10 '19 03:07 lamw

Yes, get-vsanview works just fine. I tried running the script example for getting the vsan version from your blog one command at a time.

PS C:> get-vsanview

VsanClient MoRef


VMware.Vsan65.Views.VsanClientImpl VsanVcClusterConfigSystem-vsan-cluster-config-system VMware.Vsan65.Views.VsanClientImpl VimClusterVsanVcStretchedClusterSystem-vsan-stretched-cluster-system VMware.Vsan65.Views.VsanClientImpl VimClusterVsanVcDiskManagementSystem-vsan-disk-management-system VMware.Vsan65.Views.VsanClientImpl VsanVcClusterHealthSystem-vsan-cluster-health-system VMware.Vsan65.Views.VsanClientImpl VsanUpgradeSystemEx-vsan-upgrade-systemex VMware.Vsan65.Views.VsanClientImpl VsanSpaceReportSystem-vsan-cluster-space-report-system VMware.Vsan65.Views.VsanClientImpl VsanIscsiTargetSystem-vsan-cluster-iscsi-target-system VMware.Vsan65.Views.VsanClientImpl VsanObjectSystem-vsan-cluster-object-system VMware.Vsan65.Views.VsanClientImpl VsanPerformanceManager-vsan-performance-manager

PS C:> $vchs = get-vsanview -Id "VsanVcClusterHealthSystem-vsan-cluster-health-system" PS C:> $cluster_view = (Get-Cluster -name Management).ExtensionData.MoRef PS C:> $results = $vchs.VsanVcClusterQueryVerifyHealthSystemVersions($cluster_view) Exception calling "VsanVcClusterQueryVerifyHealthSystemVersions" with "1" argument(s): "Could not establish trust relationship for the SSL/TLS secure channel with authority 'VC_Name'." At line:1 char:1

  • $results = $vchs.VsanVcClusterQueryVerifyHealthSystemVersions($cluste ...
  •   + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
      + FullyQualifiedErrorId : SecurityNegotiationException
    

mmohr1 avatar Jul 11 '19 15:07 mmohr1