saltext.vcf.utils.esxi¶
ESXi host connection helpers — standalone/unmanaged ESXi only.
All communication uses the pyVmomi SOAP/VMODL stack (/sdk). This works on
any ESXi host regardless of whether the vAPI endpoint (/api/*) is present,
which is important because shuttle-deployed test hosts omit that service.
On hosts that have been joined to a vCenter, the REST /api/session endpoint
is blocked (400 on real VCF 9.2). For hosts managed by vCenter, cluster-
level configuration is done via the Configuration Profile API; see
saltext.vcf.clients.cluster_config.
Config is read from Salt opts/pillar under saltext.vcf.esxi:
saltext.vcf:
esxi:
host: esxi-test.example.com
username: root
password: VMware123!
verify_ssl: false
- saltext.vcf.utils.esxi.get_config(opts, profile=None)[source]¶
Extract ESXi connection config from Salt opts/pillar.
- saltext.vcf.utils.esxi.get_service_instance(opts, profile=None)[source]¶
Return a connected pyVmomi
ServiceInstancefor the ESXi host.Cached per
(host, port, username). Useinvalidate_service_instance()to force a fresh connection.