Introduction
Virtual Machines (VMs) are foundational in Azure-based infrastructure. But spinning up a VM is only the beginning, effective cloud management involves fine-tuning configurations, optimizing compute resources, handling storage, and automating operations for cost-efficiency.
In this guided lab, you’ll step into the role of a junior cloud engineer assisting an Azure admin. Your mission: manage a Linux-based VM already deployed in a virtual network. You’ll move the VM to a secure subnet, scale up its performance, attach additional storage, and automate shutdown to reduce unnecessary costs.
This scenario reflects real-world operational tasks performed by Azure admins, DevOps engineers, and system administrators in modern cloud environments.
Skilling Objectives
- Reassign a VM to a secure subnet with network security rules
- Vertically scale VM resources for higher performance
- Attach a data disk to expand VM storage
- Configure automated shutdown for cost optimization
Architecture Overview
You’ll be working with an existing VM resource named guided-project-vm
, housed in the same virtual network where you previously created a secure subnet (ftpSubnet
). This subnet is protected by a Network Security Group (NSG) allowing only SFTP traffic on port 22.
Here’s what you’ll accomplish:
- Move
guided-project-vm
into theftpSubnet
- Resize the VM to a more powerful instance (e.g., D2s_v5)
- Attach a 20 GB data disk to support file storage
- Set up an automatic daily shutdown at 7:15 PM UTC
These updates mirror best practices for cloud efficiency, scalability, and security.
Lab Instructions
🧠 Prerequisite: You need access to an active Azure subscription and the Azure Portal.
Step 1: Move the Virtual Machine to a New Subnet
To isolate the VM and apply network security rules, you’ll move it to the ftpSubnet
.
- Go to https://portal.azure.com and sign in.
- In the top search bar, type Virtual machines and select it from Services.
-
If the VM is currently running, click Stop.
Azure must restart the VM to apply subnet changes. It will automatically restart after the configuration.
Wait until the Status field shows Stopped (deallocated).
In the left menu, select Networking under the Settings section.
On the IP configurations page, update the Subnet to
ftpSubnet
.
✅ You’ve successfully moved the VM to a subnet with security rules tailored for SFTP access.
Step 2: Vertically Scale the Virtual Machine
Next, you'll improve the VM's processing power to support higher traffic or heavier workloads.
- Go back to the Virtual machines service and open
guided-project-vm
again. In the left-hand menu, under Availability + scale, click Size.
Select a more powerful VM size — for example, D2s_v5.
Note: Azure may not reflect the size change immediately until the VM restarts.
🎯 Your VM now has improved compute capacity for handling the new role as an SFTP server.
Step 3: Attach a Data Disk to the VM
You’ll now provide additional storage for file transfers and uploads.
With
guided-project-vm
selected, go to the Disks section under Settings.
Click + Create and attach a new disk.
Set the Disk name to
ftp-data-disk
.Keep LUN and Storage type as default.
Set the Size to
20 GB
.Click Apply.
💾 Your VM now has an attached disk ready to store uploaded files or logs from users.
Step 4: Configure Automatic Shutdown
To manage costs, you’ll automate the VM to shut down every day at 7:15 PM UTC.
- Return to the
guided-project-vm
overview. In the left-hand menu, scroll down to Operations and click Auto-shutdown.
Set the Scheduled shutdown time to 7:15:00 PM.
🔌 With this automation in place, the VM won’t run idle after business hours — saving on compute charges.
Real-World Illustration
Picture this: You work at a mid-sized fintech company. The IT team deploys a secure virtual machine to handle internal file uploads from staff via SFTP. To reduce security risks, the machine is moved into a subnet protected by firewall rules. Because the team sends larger files, you scale up the machine’s processor. Next, you attach more disk space to store reports. And finally, since no one's uploading files overnight, you schedule an automatic shutdown — saving the company money while maintaining performance and security.
This hands-on project mirrors exactly that kind of operational thinking.
Conclusion
In this lab, you’ve gone beyond just launching a virtual machine — you've managed its network, compute, storage, and automation. These skills are essential for any Azure Cloud Engineer, DevOps practitioner, or IT administrator aiming to manage production-ready cloud infrastructure.
You learned how to:
- Move a VM to a secure subnet
- Resize it for better performance
- Attach extra disks for data storage
- Automate shutdowns for cost-efficiency
☁️ Whether you're building your portfolio or prepping for certification, these steps demonstrate your ability to manage and optimize virtual machines in a real-world Azure environment.
Top comments (0)