Blogs

Vagrant VMware vCenter Simulator

Dan Tehranian –

When developing and testing a product that integrates with VMware vSphere, it can often be useful to have a vCenter to test against. Unfortunately for developers and testers, the process of setting up and managing their own vCenter instance along with the necessary entities for it to manage can be extremely time consuming. One alternative is to have a shared instance used by many people, but can cause issues of engineers stomping on each other’s feet.

At Virtual Instruments we needed a way to test against VMware’s API for for metrics collection. Leveraging the vCenter Server Appliance OVA and numerous posts on vCenter configuration automation from virtuallyGhetto, I came up with a builder to create a Vagrant box out of vCenter that runs in simulator mode. The vCenter simulator mode is built in to vCenter and is an unsupported way to simulate an inventory of hosts, clusters, VMs, data stores, etc, along with performance metrics for those entities that can then be queried via VMware’s API.

Note that the resulting Vagrant box can also be used with the “vagrant-vcenter” plugin to deploy these vCenter Simulators into a vSphere environment so that people don’t have to run the vCenter Simulator locally.