Closed Ujkugri closed 4 months ago
This issue has been migrated to https://github.com/hashicorp/packer-plugin-azure/issues/412 due to the Packer Plugin split.
Please follow the new issue for updates.
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Community Note
Overview of the Issue
I have to create my own VM-Images for windows11. I do this via an AzureDevOps-Pipeline, that uses Packer to create my images. The specific image it uses to build on is
Now I run some scripts. I can, throughout all of the time my scripts run, connect to the VM packer created via RDP. However, the sysprep part is where everything goes south. At the moment, I am only running this, yes no other commands or scripts are runing:
for sysprep. The file Sysprep_succeeded.tag and the state is IMAGE_STATE_GENERALIZE_RESEAL_TO_OOBE according to my logs in the pipe. I also tried other versions and adding restarts before and after sysprep. Did not help. I tried for example this here:
https://github.com/hashicorp/packer/issues/9261
But nothing there helped. I am baffled at this point. Everytime I create a VM it just automatically goes to internal error 0x4 with 0x0 as further errorcode. I run all the scripts in the "Run command"-Section of the VM. Did not help. Restarted it. Did not help. Run again the scripts after restart did also not help. And yes, I changed the nsg to allow access to my new rdp-port. I have checked. RdAgent, WindowsAzureGuestAgent and TeamService are running on the vm. Boot Diagnostics show me a pic of the Start screen.
Also, I can run the base image with no problems in the same subscription, same rg, with the same nsg and have no problems connecting to the image that is not prepared by packer.
Packer version
Newest Version as of 17.04.2024
Operating system and Environment details
In Azure I use this as a base Image.
Log Fragments and crash.log files
Packer itself does not show any problems, even with increased verbosity, but the azure vm has this, maybe this helps?