Skip to content
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

Add shutdown_command like vsphere-iso #271

Open
arogarth opened this issue Jun 20, 2024 · 1 comment
Open

Add shutdown_command like vsphere-iso #271

arogarth opened this issue Jun 20, 2024 · 1 comment

Comments

@arogarth
Copy link

There is a closed issue for this. But building Windows Templates are hard to generalize.

Running sysprep with "/quit" and let packer shutdown the vm via winrm will reset winrm settings and user credentials - so there are "Failed Login" messages in Event Logs and winrm cannot connect.

If setting communicator to "none" will try to shutdown the VM during installation process.

There seems to be no way to sysprep and generalize the VM using proxmox-iso.

Community Note

Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request.
Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request.
If you are interested in working on this issue or have submitted a pull request, please leave a comment.

Description

A written overview of the feature.

Use Case(s)

Build Windows Server Templates with generlize.

@arogarth
Copy link
Author

OK, I got it... Running a provisioner after actvating winrm works...

{
    "provisioners": [
        {
            "type": "powershell",
            "inline": [
                "& \"$($ENV:SystemRoot)\\System32\\Sysprep\\sysprep.exe\" /mode:vm /generalize /quit /oobe"
            ]
        }
    ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant