Running Jenkins Jobs on Windows Virtual Machine Running Jenkins Jobs on Windows Virtual Machine jenkins jenkins

Running Jenkins Jobs on Windows Virtual Machine


I'm doing just that in my environment using the vSphere Cloud Plugin. Here's a basic step-by-step guide:

  1. Install the plugin
  2. Configure your ESX/ESXi server as a new "vSphere Cloud"
  3. Create a new Jenkins node, of type "Slave virtual computer running under vSphere Cloud" (which becomes available after Installing the plugin).
  4. When configuring the new node, optionally specify a snapshot name. This will revert the VM to this snapshot when the node launches.
  5. Use the node in a pipeline script: node("node-name-or-label") { ...your code here... }

I use the method above with about 10 Windows nodes, reverting each to a "Clean" snapshot to start each build with a known state.