vmware / pyvmomi-community-samples

A place for community contributed samples for the pyVmomi library.
Apache License 2.0
1.01k stars 922 forks source link

How to specify a CA file to connect my vSphere? #675

Open lazylazyboy opened 3 years ago

lazylazyboy commented 3 years ago

Hello,

I cannot find any samples in the repo using CA file, most of them use 'disableSslCertValidation'. Can anyone kindly tell me how to specify a CA for HTTPS to connect ESXi or vCenter? I tried some params of SmartConnect such as 'certFile', 'keyFile', 'sslContext', but they seems not work well, and the traceback shew that the CA was invalid.