Automation

Automated addition of VMware VM to Host Affinity Rules

Automated addition of VMware VM to Host Affinity Rules

Bradley Bishop

6 minute read

Background VMware Affinity rules can solve many issues in a virtualized environment with out the need to create different clusters or datacenters to separate Virtual Machines. The specific need that we at Encore had for this was that when a vm is being cloned, if the VM was migrated to a different Host due to a vMotion, the custom spec with Kickstart files or Autounattended Syspreps would fail. This was a random error that would only happened when vCenter or a host was overloaded.

Automated addition of VMware Disks and Controllers

Automated addition of VMware Disks and Controllers

Bradley Bishop

8 minute read

When adding disks to VMware VM using Python we need to use the pyVmomi VMware SOAP API to communicate with vCenter. pyVmomi gives us a lot of very helpful features that take out a lot of the guess work in adding new disks to a VMware VM. You can install pyVmomi from pip into a virtualenv like the following: virtualenv ~/vmware source ~/vmware/bin/activate pip install pyvmomi VMware Connection pyVmomi makes it really easy to connect to the VMware vCenter environment to query information and perform all the necessary tasks needed.

Automated creation of StackStorm Packs

Automated creation of StackStorm Packs

Nick Maludy

5 minute read

In StackStorm a pack is logical organization that contains related actions, aliases, policies, rules and sensors. To get a good overview of what a pack is please see the excellent StackStorm Pack documentation. Most users of StackStorm wish to either integrate with a new system that’s not available in the Exchange or use StackStorm to execute custom automation scripts. The way to accomplish this is to create a new Pack.