VMware Sample Exchange
Browse and download code samples from VMware as well as code samples contributed by the VMware community. Log in to Sample Exchange using your MyVMware credentials to submit requests for new samples, contribute your own samples, as well as propose a sample as a solution for open requests.
Disclaimer: All sample content and code in Sample Exchange is licensed to you by the sample's author. VMware does not guarantee the samples; they are provided "AS IS". Use of this site is subject to the VMware Community Terms of Use.
Browse the list below for code samples from VMware and the community. You can filter the list of samples by selecting a platform or language, or enter other search keywords above.
Filters
Type
SDK / Platform / Tool
Contributor
Language
- Script to fetchAuditRecordsHow to use pyVmomi SDK for vSphere 7.0U3 to fetchAuditRecords OSS pyVmomi is hosted in GitHub: https://github.com/vmware/pyvmomi The project's main page contains pointers to general instructions fo ...vSphere Python
- Python - Set Network Adapter to be an Opaque NetworkChange a VM's network adaptor to be an NSX-T provisioned opaque network, via KB66907: https://kb.vmware.com/s/article/66907NSX-T vSphere Python
- Docker image to run pyvmomiThis docker image creates container to test script based on pyvmomi library. Simply run docker build to create a test environment in your photon. Running container could be accessed via ssh or by dock ...Other Platform Other Language
- vSAN 6.2 Capacity - Total and Free from vCenterThis script is a modification of the vsanapisamples.py script that is included with the vSAN Management SDK for python. The syntax for the script is: python vsanapicapacity.py -s vCenterServer -u 'v ...Pyvmomi vSAN Management SDK for Python Python
- vSAN 6.2 On-Disk Upgrade using the vSAN Management SDK for PythonThis file includes sample code to upgrade the On-Disk Format from V2 to V3 for vSAN 6.2. The code has been tested with the following configuration Testbed: One cluster with four hosts. Each host has o ...Pyvmomi vSAN Management SDK for Python Python
- Reconfigure ESXi host for HAScript in python, using pyVmomi library, that performs a Reconfigure for HA operation on an ESXi host that is part of vSphere HA cluster. Provide the vCenter host, user, password and ESXi host as argu ...vSphere Management SDK Python
- Initiate vCenter HA graceful failover using vSphere python SDK i.e. pyVmomi... # Website: www.vThinkBeyondVM.com # Product: vCenter server/vCenter Server High Availability (VCHA) # Description: Script to initiate vCenter Server High Availability failover # Refe ...vSphere Management SDK Python
- Get vCenter server HA health information using vSphere Python SDK i.e. pyVmomi... # Product: vCenter server/vCenter Server High Availability (VCHA) # Description: Python script to Get vCenter server HA health information # Reference: http://vthinkbeyondvm.com/how-to-m ...vSphere Management SDK Python
- Python script to get associated DRS rules for a Virtual Machine... # Author: Vikas Shitole # Website: www.vThinkBeyondVM.com # Product: vCenter server/vSphere DRS rules # Description: Python script to get associated DRS rules for a Virtual Machine (fr ...vSphere Management SDK Python
- vsanmetricsExport VMware vSAN metrics to InfluxDB vsanmetrics vsanmetrics is a tool written in Python for collecting usage and performance metrics and health status from a VMware vSAN cluster and translating th ...Other Platform vSphere Automation SDK for Python Python