- Newest
- Most votes
- Most comments
This issue appears to be related to known problems with Windows Server 2025 on EC2. There are a couple of potential causes and solutions to explore:
-
The issue might be related to Device Guard being enabled by default in Windows Server 2025, which has been known to cause problems with instance reachability and proper functioning. This is particularly relevant after Windows updates.
-
For your specific RRAS VPN shutdown issue, you could try:
- Disabling Device Guard through Group Policy (gpedit.msc) by navigating to Computer Configuration > Administrative Templates > System > Device Guard and disabling "Turn On Virtualization Based Security"
- Alternatively, use the registry method by running these commands in an elevated PowerShell:
reg add HKLM\System\CurrentControlSet\Control\Lsa /v LsaCfgFlags /d 0 /t REG_DWORD
reg add HKLM\SOFTWARE\Policies\Microsoft\Windows\DeviceGuard /v LsaCfgFlags /d 0 /t REG_DWORD
- If you're still experiencing issues, consider:
- Using an AMD instance type (like your t3a.medium), as some issues with Windows Server 2025 only affect instance types where VBS/CG is available
- Using a BIOS boot mode image for Windows Server 2025 instead of UEFI
- Reinstalling WMIC using:
DISM /Online /Add-Capability /CapabilityName:WMIC~~~~as Microsoft has deprecated this in Windows Server 2025, which can cause various issues with EC2 Launch Agent
- As a last resort, you could force stop the instance using the AWS console or CLI with the
--forceoption when the instance gets stuck in the shutdown process.
These issues with Windows Server 2025 are being actively worked on by the EC2 team, so future updates may resolve these problems.
Sources
Windows 2025 + EC2 Launch Agent V2 breaking userdata behavior | AWS re:Post
windows server 2025 unreachable after kB5048667 | AWS re:Post
Troubleshoot Amazon EC2 instance stop issues - Amazon Elastic Compute Cloud
answered 8 months ago
Relevant content
asked 2 years ago
asked 3 years ago
asked 2 years ago

I tried Disabling Device Guard through Group Policy and Reinstalling WMIC, neither resolved the issue.