- Newest
- Most votes
- Most comments
Thank you for sharing your experience and solution regarding the issue with Windows Server 2025 and EC2 Launch Agent v2. Your findings are valuable for the AWS community.
Indeed, the deprecation of the Windows Management Instrumentation Command-line (WMIC) utility in Windows Server 2025 has caused an unexpected issue with the EC2 Launch Agent v2. This change affects the agent's ability to execute certain tasks during instance initialization, specifically the 'preReady-installEgpuManager-0' step.
The solution you've provided, reinstalling WMIC using the DISM command, is a good workaround for this issue:
DISM /Online /Add-Capability /CapabilityName:WMIC~~~~
This command adds the WMIC capability back to the system, allowing the EC2 Launch Agent to function as expected.
Regarding the user data execution, it's important to note that by default, user data scripts run only once at the initial launch of an instance. The behavior you've described, where user data is skipped during the warm-up but executed during scale-up, is not the typical behavior and may be related to the issue you encountered.
Your suggestion to improve logging when the User Data step is skipped is a good one. More detailed logs could indeed help in troubleshooting such issues more quickly in the future.
It's worth mentioning that for Windows instances, EC2Launch v2 supports various customization options, including the ability to run user data before or after certain stages in the agent configuration file. If you need user data to run consistently, you might want to explore these configuration options.
Thank you again for sharing this information. It will undoubtedly be helpful for others encountering similar issues with Windows Server 2025 and EC2 Launch Agent v2.
Sources
Configure EC2Launch v2 settings for Windows instances - Amazon Elastic Compute Cloud
Use the EC2Launch v2 agent to perform tasks during EC2 Windows instance launch - Amazon Elastic Compute Cloud
Run commands when you launch an EC2 instance with user data input - Amazon Elastic Compute Cloud
Relevant content
asked 2 years ago
