5 Easy steps to fix “Windows Not Activated” issue in AWS EC2 server created by Custom Amzon Machine Image.

Sometime, you may required to create an EC2 instance on a subnet of a VPC using a Custom AMI of another EC2 instace, which is running on different subnet. And once you create the new EC2 instance, you might see that, Windows is not getting activated and the metadata is not populating on the wallpaper.

When you create an AMI, it’s getting saved with the current routes of the EC2 instance. This AMI will work fine until you use it to create new EC2 instances on the same subnet. But, the moment you use it to create an EC2 instance on a different subnet, your newly created Windows instance will not get activated. Reason behind this is, in order to activate the Windows, EC2 instance needs to have AWS persistent routes with the correct “Default Gateway” of the subnet. And these gateways differes from subnet to subnet and if you decide to create the new EC2 instance on a diffrent subnet, you need to update the routes with proper gateway.

Follow the given steps to resolve it easily and activate your Windows Server.

Step 1

Login to the server using admin credentials. Open command prompt as an Administrator then run ipconfig to see IP of the default gateway.

Step 2

Now, execute route print and you will be able to see that all the persistent routes are still using the AMI’s instance default gateway.

Step 3

Now delete all these routes using following commands.

route delete <Network Address> mask <Mask>

Step 4

Add the sames routes replacing the correct gateway IP which you got from Step 1.

route -p add <Network Address> mask <Mask> <Default Gateway IP> METRIC <Metric Value>

If you run route print again, you will see the persistent routes with correct default gateway.

Step 5

Finally reboot the server and once it is booted up, you will see that the Windows has been activated.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Website Powered by WordPress.com.

Up ↑

%d bloggers like this: