- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Steps for Linux:
-------------------
1) Download the crt file from vCenter.
i.e,
Go to https://vCenter in your browser and press Enter.
At the bottom right of the page, there is an option to "Download trusted root CA certificates."
It will download the zip file, extract it, and then navigate to the "lin" folder, where it has the certificate file (i.e., "XXXXXXXX.0").
2) Copy the cert file and save it in the "/etc/ssl/certs" folder on your client machine.
3) Add the vCenter IPaddress and hostname entry in the /etc/hosts file. ( if any DNS resolution issue)
4) Run the Python program, but make sure to pass the vCenter hostname (FQDN) instead of the IP address in the code or command.
Eg: without any ssl context
from pyVim.connect import SmartConnect
si = SmartConnect(host="<vCenter or ESXi hostname>", user="<username>", pwd='<password>', port=443)