Skip to content

Error sending shutdown command building Windows Server 2022/2025 #694

@gianmarco-mameli

Description

@gianmarco-mameli

Code of Conduct

  • I have read and agree to the Code of Conduct.
  • Vote on this issue by adding a 👍 reaction to the original issue description to help the maintainers prioritize.
  • Do not leave "+1" or other comments that do not add relevant information or questions.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.

Packer Version

1.15.1

Packer Plugin Version

2.1.2

Plugin Builder

  • vsphere-iso
  • vsphere-clone
  • vsphere-supervisor

Plugin Post-Processor

  • vsphere
  • vsphere-template

vSphere Version

8.0.3.00000

Description

Hi, I'm having trouble closing a build of Windows Server 2022 and 2025 via Packer on vSphere 8.0.3.00000.
The shutdown command it's a simple script to launch the sysprep but after it's correct execution and shutdown of the machine, the build goes to error, like the build doesn't know the correct launch and execution

Packer Configuration

Packer config
https://gist.github.com/gianmarco-mameli/3b879285dfa33e68e4e7bbca5ffddc28

sysprep.cmd content

cmd /c "C:\Windows\System32\Sysprep\sysprep.exe /generalize /oobe /shutdown"

Debug Output

https://gist.github.com/gianmarco-mameli/86c18f633a31f1064acc9715bab812c4

Panic Output

No response

Expected Behavior

The build is correctly closed and exported

Actual Behavior

The build fail, the log says the shutdown command it's not executed

Steps to Reproduce

Use the config provided an see the log

Environment Details

No response

Screenshots

No response

References

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions