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
- PowerCLI Port of RVC command vsan.cluster_infoThis script includes a function that reports the vSAN Cluster information for a vSAN Cluster. Information included is: Host configurations vSAN Witness Host configuration (if Stretched Cluster or 2 N ...VMware PowerCLI PowerShell
- PowerCLI Port of RVC command vsan.health.cluster_repair_immediatelyThis script will invoke the process to repair any vSAN Objects that need to be repaired. This is typically used when the 60 minute (default) Repair Timer has not expired, but an administrator would li ...VMware PowerCLI PowerShell
- PowerCLI Port of RVC command vsan.stretchedcluster.witness_infoThis script includes a function that reports the vSAN Witness information for a 2 Node or Stretched vSAN Cluster. Information included is: Cluster Name Witness Host Name Witness Uuid Witness IP Addre ...VMware PowerCLI PowerShell
- vSAN 6.x Stretched Cluster and 2 Node PowerCLI ModuleModule for vSAN Stretched Cluster & 2 Node I took some of my existing scripts and combined them into a module Setup requires the psd1/psm1 files to be put in a VSANSC2N directory under Powershell Modu ...VMware PowerCLI PowerShell
- 2 Node Forced Warm Cache for Hybrid vSANThis script forces reads to occur across both hosts in a 2 Node vSAN configuration. More information on the how and why, can be found here: https://blogs.vmware.com/virtualblocks/2016/04/18/2node-read ...VMware PowerCLI PowerShell
- PowerCLI vSAN Witness DeploymentThis script deploys a vSAN 6.0/6.5/6.7/& 6.7 P01 Witness Appliance. It will: Configure networking Add the vSAN Witness to vCenter Allows either Management (vmk0) or vmk1 to have vSAN Traffic tagged ( ...VMware PowerCLI PowerShell
- PowerCLI vSAN Witness ReplacementThis script removes a vSAN Witness Host for 2 Node and Stretched Cluster vSAN & replaces it. If the vSAN Witness Host is available, this script removes the vSAN disk group on the vSAN Witness Host (so ...VMware PowerCLI PowerShell
- Sample 2 Node vSAN Deployment ScriptI started some of this with PowerCLI 6.x and have recently only used it with PowerCLI 10.x vSphere 6.5 Update 1 (July 2017) is the earliest build I've validated it on lately - Your Mileage May Vary o ...VMware PowerCLI PowerShell
- PowerCLI Port of RVC command vsan.object_infoThis is the first of many RVC Style Functions that use PowerCLI 11 to mimic some of the tasks available in the Ruby vSphere Console for vSAN Requires William Lam's VSANUUIDtoVM Function, located here: ...VMware PowerCLI PowerShell
- Configure Stretched Clustering using the vSAN Management SDK for PythonThis file includes sample code to configure a vSAN cluster as a Stretched Cluster or 2 Node configuration. The code has been tested with the following cases Testbed: One cluster with four hosts. Each ...vSAN Management SDK for Python Python