jetbrains-infra / packer-builder-vsphere

Packer plugin for remote builds on VMware vSphere
Mozilla Public License 2.0
543 stars 175 forks source link

Don't shutdown the VM once the build finishes #317

Closed amitbhadra closed 4 years ago

amitbhadra commented 4 years ago

Using the vsphere-iso, we can create a new VM and boot it up, etc. But after it finishes, it sends a shut down command. I need it to be booted up after this. Can we skip the shut down and finish successfully?

[1;32m==> vsphere-iso: Waiting for SSH to become available...
[1;32m==> vsphere-iso: Connected to SSH!
[1;32m==> vsphere-iso: Shutting down VM...

When I have "disable_shutdown":"true", by default it waits for 5 minutes and the build fails because I didn't have a script in place to shut down the machine.

[1;32m==> vsphere-iso: Connected to SSH!
[1;32m==> vsphere-iso: Automatic shutdown disabled. Please shutdown virtual machine.
[1;32m==> vsphere-iso: Provisioning step had errors: Running the cleanup provisioner, if present...
[1;32m==> vsphere-iso: Clear boot order...
[1;32m==> vsphere-iso: Power off VM...
[1;32m==> vsphere-iso: Destroying VM...
[1;31mBuild 'vsphere-iso' errored: Timeout while waiting for machine to shut down.
VladRassokhin commented 4 years ago

Packer and this plugin mainly used to create temples or 'images', running instances doesn't qualify for this. If you need to power up instance after packer build I'd recommend to use separate script or custom postprocessor.

Closing as out of scope. Also this repo is deprecated, please create issues in main packer issue tracker.