/kind feature
Describe the solution you'd like
Two improvements for Windows VM image builds:
1. windows_install_type configuration option
Add a new optional builder field windows_install_type (string) that controls
the Sysprep InstallType sent to the V4 API during Windows guest customization.
FRESH — for ISO-based fresh installs where the unattend XML drives a clean
OS installation. The VM should stay powered off after sysprep so Packer can
capture the disk.
PREPARED (default) — for pre-sysprepped/prepared images where Nutanix
auto-restarts the VM after shutdown to apply customization on first boot.
Without this option the plugin always uses PREPARED, which causes Nutanix to
restart the VM after sysprep shutdown — breaking the Packer capture workflow
for fresh ISO installs.
Validation is case-insensitive and rejects any value other than FRESH or
PREPARED.
2. Shutdown resilience
- Tolerate communicator disconnect during
shutdown_command: When the
shutdown command triggers a sysprep that powers off the VM, the SSH/WinRM
communicator may disconnect before Packer reads the exit status. This is now
logged as a warning instead of halting the build.
- Tolerate PowerOff errors when VM is already shut down: If the VM has
already powered off (e.g. via sysprep), the explicit PowerOff call may fail.
This is now logged as a warning instead of halting the build.
Anything else you would like to add:
Split from #357 at the maintainer's request for easier review and release tracking.
See discussion: #357 (comment)
Environment:
- packer-plugin-nutanix version: latest
main at commit 6313e87
- Packer version: v1.15.3
/kind feature
Describe the solution you'd like
Two improvements for Windows VM image builds:
1.
windows_install_typeconfiguration optionAdd a new optional builder field
windows_install_type(string) that controlsthe Sysprep
InstallTypesent to the V4 API during Windows guest customization.FRESH— for ISO-based fresh installs where the unattend XML drives a cleanOS installation. The VM should stay powered off after sysprep so Packer can
capture the disk.
PREPARED(default) — for pre-sysprepped/prepared images where Nutanixauto-restarts the VM after shutdown to apply customization on first boot.
Without this option the plugin always uses
PREPARED, which causes Nutanix torestart the VM after sysprep shutdown — breaking the Packer capture workflow
for fresh ISO installs.
Validation is case-insensitive and rejects any value other than
FRESHorPREPARED.2. Shutdown resilience
shutdown_command: When theshutdown command triggers a sysprep that powers off the VM, the SSH/WinRM
communicator may disconnect before Packer reads the exit status. This is now
logged as a warning instead of halting the build.
already powered off (e.g. via sysprep), the explicit PowerOff call may fail.
This is now logged as a warning instead of halting the build.
Anything else you would like to add:
Split from #357 at the maintainer's request for easier review and release tracking.
See discussion: #357 (comment)
Environment:
mainat commit 6313e87