DEV Community

Cover image for šŸ–„ļø Part 3: Managing the Virtual Machine - Migration, Scaling & Cost Optimization
     Faith Aneke Ada
Faith Aneke Ada

Posted on

šŸ–„ļø Part 3: Managing the Virtual Machine - Migration, Scaling & Cost Optimization

Overview

As the environment continued to evolve, networking was only one piece of the puzzle.

With the new ftpSubnet created and secured in Part 2, the next step was ensuring the virtual machine could properly support its workload.

This phase moved beyond networking and focused on VM management ,i.e aligning subnet placement, compute power,storage and cost optimization to ensure performance, security, and efficiency.

Here’s how I handled it šŸ‘‡

šŸ”„ Step 1: Migrating the VM to the New Subnet

Since the new subnet had stricter network rules (allowing only SSH – Port 22), the VM had to be placed inside it.

I navigated to:
•Virtual Machines
•Selected guided-project-vm
virtual machine

•Stopped the VM (Azure requires deallocation for subnet changes)
stop the vm

•Waited until it showed Stopped (deallocated)
deallocated

Then:
•Opened Networking
•Selected the Network Interface / IP configuration
network interface

•Changed the subnet to ftpSubnet
•Clicked Apply
Subnet to ftp

šŸ“ Note

The VM was now operating inside the secured subnet environment
āœ… Network segmentation
āœ… Security alignment

šŸ“ˆ Step 2: Vertically Scaling the VM

With the VM transitioning into an FTP server role, it needed more processing power.

From the VM blade:
•I selected Size under Availability + Scale
•Chose a higher SKU (e.g., D2s_v5)
•Clicked Resize
Resize

šŸ“ Note

āœ… Vertical scaling allows us to increase CPU and memory without redeploying the VM.
āœ… Now the machine could handle more concurrent connections and file transfers.
āœ… Performance upgraded šŸš€

šŸ’¾ Step 3: Attaching a New Data Disk

An FTP server without sufficient storage is a problem waiting to happen.
So I attached a new managed disk:
•Opened Disks
•Selected Create and attach a new disk
new disk

•Named it ftp-data-disk
•Set size to 20 GB
•Applied changes
Apply changes

šŸ“ Note

āœ… The VM now had dedicated storage for uploads and file transfers.

ā±ļø Step 4: Configuring Automatic Shutdown (Cost Control)

Running a VM 24/7 can quietly increase cloud costs.
Since the admin only needed the FTP server during working hours, I configured automatic shutdown:
•Navigated to Auto-shutdown
•Set scheduled shutdown to 7:15 PM (UTC)
•Saved configuration
Auto shutdown

šŸ“ Note

āœ… Now,the VM automatically powers down daily thereby reducing unnecessary compute charges.
āœ… Cost optimization is also in action šŸ’”

šŸ“Š Final Outcome

By the end of this task, I had:
āœ…ā€¢Migrated the VM to a secured subnet
āœ…ā€¢Increased its compute capacity
āœ…ā€¢Expanded its storage
āœ…ā€¢Implemented automated cost control

This exercise reinforced something important:
Azure management isn’t just about deploying resources,it’s about maintaining,optimizing, and securing them over time.

That’s what real cloud administration looks like.

Top comments (1)

Collapse
 
realcloudprojects profile image
SKILL.SCH

Good finops practices welldone!