-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows with ssh-communicator failed to execute shutdown command #173
Comments
Hi @luclis, That's weird, the powershell provisioner doesn't chmod anything whatsoever, I'm curious on how you're running into this. If possible would you mind sharing more about your template? Thanks! |
Hi @lbajolet-hashicorp, |
Hi @luclis, I hadn't seen the links to the gists for both the build and the unattend.xml indeed, my bad 😅 I'll check locally if I can replicate the issue, thanks for the update! |
Hi Lucas, I rebuild it this morning and can't reproduce the issue 🤔 |
Clossing as "can't reproduce", I'll reopen it if I find what I've done. Thanks |
Overview of the Issue
When you use Packer with ssh communicator, he expect to see somes Unix-like machine. When you specify an shutdown command, he try an command like this :
chmod +x /tmp/script_5623.sh; PACKER_BUILDER_TYPE='qemu' PACKER_BUILD_NAME='Windows' PACKER_HTTP_ADDR='10.0.0.2:0' PACKER_HTTP_IP='10.0.0.2' PACKER_HTTP_PORT='0' /tmp/script_5623.sh
.On Windows, chmod isn't find and the build failed.
Workaroud : Use a provisioner and run the shutdown command.
Reproduction Steps
1/ Download Packer builder
2/ Download any prerequisites (Windows ISO ; builders ; virtio iso)
3/ Download Unattened.xml
4/ Run the build.
Plugin and Packer version
Packer v1.10.3
Simplified Packer Buildfile
Gist in Reproduction steps.
Operating system and Environment details
Ubuntu 22.04 x64.
Log Fragments and crash.log files
The text was updated successfully, but these errors were encountered: