Keep VM powered on until parallel build is finished

Hi,

I am using the vsphere-clone builder.
I have 2 build sources one for an app and another for a database.
I am not running any provisioner on the database VM, only on the app VM.
The provisioner that runs on the app VM needs to execute some commands on the database VM via remote mysql connection.

The problem is that due to the fact that no work is being done on the database VM - I have assigned it the none communicator and as a result the DB VM is immediately turned off and saved as a template.

How should I keep the DB VM on until the provisioner is finished on the app VM ?

So no option to keep it on during the build ?

The current solution for me is to use ssh communicator along with -on-error=abort
This results in having the DB VM staying on during and after the build, but then I need to manually turn it into a template - so its not optimal.

Another possible solution is to use the shell provisioner to send the DB VM a sleep command , but I was hoping there is some builtin functionality here that is more packer build “aware”.

BTW using shutdown_timeout does not seem to have any effect (tested with the none communicator).