Bobcares

Resize EC2 Windows instance – How to do it

by | Jul 14, 2021

Wondering how to resize EC2 Windows instance? We can help you.

Here, at Bobcares, we assist our customers with several AWS queries as part of our AWS Support Services.

Today, let us see how our Support Techs resize EC2.

 

How to resize EC2 Windows instance?

Following are some of the requirements in order to resize the instance:

  • You must select an instance type that is compatible with the configuration of the instance. If the instance type that you want is not compatible with the instance configuration you have, then you must migrate your application to a new instance with the instance type that you need.
  • To change the instance type, the instance must be in the stopped state.
  • You cannot resize an instance if hibernation is enabled.

Today, let us see the procedure followed by our Support Techs to resize the instance.

Compatibility for resizing instances

You can resize an instance only if its current instance type and the new instance type that you want are compatible in the following ways:

  • Architecture: AMIs are specific to the architecture of the processor, so you must select an instance type with the same processor architecture as the current instance type.
  • Network: Newer instance types must launch in a VPC. Therefore, you can’t resize an instance in the EC2-Classic platform to a instance type that is available only in a VPC unless you have a nondefault VPC.
  • Network adapters: If you switch from a driver for one network adapter to another, the network adapter settings are reset when the operating system creates the new adapter. To reconfigure the settings, you might need access to a local account with administrator permissions.
  • Enhanced networking: Instance types that support enhanced networking require the necessary drivers installed.
  • NVMe: EBS volumes are exposed as NVMe block devices on instances built on the Nitro System. If you resize an instance from an instance type that does not support NVMe to an instance type that supports NVMe, you must first install the NVMe drivers on your instance.

 

To resize an Amazon EBS–backed instance

  • If the new instance type requires drivers that are not installed on the existing instance, you must connect to your instance and install the drivers first.
  • If you configured your Windows instance to use static IP addressing and you resize the instance from a type that doesn’t support enhanced networking to an instance type that does support enhance networking.

You might get a warning about a potential IP address conflict when you reconfigure static IP addressing.

To prevent this, enable DHCP on the network interface for your instance before you change the instance type.

From your instance, open the Network and Sharing Center, go to Internet Protocol Version 4 (TCP/IPv4) Properties for the network interface, and choose Obtain an IP address automatically.

Change the instance type and reconfigure static IP addressing on the network interface.

  • Then, open the Amazon EC2 console.
  • Then, connect to your Windows instance and run the following EC2Launch PowerShell script to configure the instance after it is resize.
PS C:\> C:\ProgramData\Amazon\EC2-Windows\Launch\Scripts\InitializeInstance.ps1 -Schedule
  • In the navigation pane, choose Instances.
  • Select the instance and choose Actions, Instance state, Stop instance.
  • In the confirmation dialog box, choose Stop. It can take a few minutes for the instance to stop.
  • With the instance still selected, choose Actions, Instance settings, Change instance type.

This action is grayed out if the instance state is not stopped.

  • In the Change instance type dialog box, do the following:

1.From Instance type, select the instance type that you want.

2.Then, if the instance type that you select supports EBS–optimization.

Select EBS-optimized to enable EBS–optimization or deselect EBS-optimized to disable EBS–optimization.

3. Choose Apply to accept the new settings.

  • To restart the stopped instance, select the instance and choose Instance state, Start instance.

It can take a few minutes for the instance to enter the running state.

 

To migrate your application to a compatible instance

1.Back up any data on your instance store volumes that you need to keep to persistent storage.

To migrate data on your EBS volumes that you need to keep, create a snapshot of the volumes or detach the volume from the instance so that you can attach it to the new instance later.

2.Launch a new instance, selecting the following:

  • If you are using an Elastic IP address, select the VPC that the original instance is currently running in.
  • Any EBS volumes that you detached from the original instance and want to attach to the new instance, or new EBS volumes based on the snapshots that you created.
  • If you want to allow the same traffic to reach the new instance, select the security group that is associate with the original instance.

3.Install your application and any required software on the instance.

4.Restore any data that you backed up from the instance store volumes of the original instance.

5.If you are using an Elastic IP address, assign it to the newly launched instance as follows:

  • In the navigation pane, choose Elastic IPs.
  • Select the Elastic IP address that is associated with the original instance and choose Actions, Disassociate Elastic IP address. When
  • prompted for confirmation, choose Disassociate.
  • With the Elastic IP address still selected, choose Actions, Associate Elastic IP address.
  • For Resource type, choose Instance.
  • For Instance, choose the instance with which to associate the Elastic IP address.
  • Then for Private IP address, specify a private IP address with which to associate the Elastic IP address.
  • Choose Associate.

6.You can terminate the original instance if it’s no longer needed.

Select the instance and verify that you are about to terminate the original instance, not the new instance.

Choose Instance state, Terminate instance.

[Need help with the EC2 query? We’d be happy to help]

 

Conclusion

In short, today we saw how our Support Techs resize EC2 Windows instance

 

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.