Extending the root volume of an EC2 Windows instance and attaching an additional volume is a multi-step process. Here's a step-by-step guide to achieve this:
Step 1: Launch an EC2 Windows Instance
- Log in to the AWS Management Console.
Navigate to the EC2 Dashboard.
Click "Launch Instance" to create a new EC2 instance.
Choose a Windows AMI (Amazon Machine Image) and select an instance type.
In the "Add Storage" section, configure the root volume size according to your requirements.
Complete the instance launch wizard, including security group and key pair settings.
Launch the instance.
Step 2: Connect to the EC2 Instance
- Once the instance is running, right-click it in the EC2 Dashboard, and select "Connect."
- Follow the instructions to connect to the instance using Remote Desktop Protocol (RDP).
Step 3: Extend the Root Volume
- Inside the EC2 Windows instance, open the "Disk Management" utility under Computer Management.
- Locate the root volume, which is typically labeled as "C:." and you can see current storage as 30 GB (We will try to extend this volume)
- Go to AWS console -> Volume -> Select volume -> Click on action -> 'Modify Volume' and change it to 40 GB
- Go to EC2 Windows instance, open the "Disk Management" utility under Computer Management.
Note: You can see in the snip as total 40 GB online out of which 10 GB Unallocated
- Right-click on disk and choose 'Extend Volume'
Validation:
- You can see extended volume in below snip
Step 4: Attach an Additional EBS Volume
- In the AWS Console, navigate to the EC2 Dashboard and click on "Volumes" in the left navigation pane.
Create a new EBS volume with the desired size (e.g., 30GB). Note the availability zone.
Back in the EC2 Dashboard, stop the Windows instance to attach the new volume.
Go to Volume and select it and choose 'Attache Volume' from 'Action'
Select instance ID & Create Volume
Back in the EC2 Dashboard
Start the instance.
Connect to the instance using RDP.
Open the "Disk Management" utility.
You will see the new volume listed. Initialize it and format it as needed.
Step 5: Validate the Configuration
- In Windows Explorer, verify that the root volume (C:) has been extended with the additional space.
Create and modify files on the extra volume to ensure it is functioning correctly.
You can also check the disk sizes and available space in the "File Explorer" or use the "Get-Volume" PowerShell command.
Big big congratulation for completing this hands on LAB
Don't forget to do cleanup of all these AWS services which can lead to extra charges
Follow me on Linkedin | Twitter for more such contents and Check out my Services
Top comments (0)