I’m using packer to build out Windows templates for a vSphere environment. I’m testing things like installing updates using the windows-update plugin and some post processing to run scripts after everything is done.
The main challenge I have is that if something goes wrong and I need to make changes, I need to redeploy/reinstall the entire base image all over again. This gets pretty time consuming.
Examples are testing exclusions in the windows-update plugin to not install certain patches or running a post process script to kick of a powershell script and passing variables to it.
Is there a way to take a running VM and test provisioners and post processing commands against it to see if it works as expected. Snap the VM before running anything, then if it doesn’t work, restore the snapshot and try again.