How to Move, Scale, and Optimize an Azure Virtual Machine for Performance and Security

Managing a virtual machine (VM) in Azure is more than just turning it on and off.
To get the best out of your VM, you need to know how to move it to the right network, scale it for better performance, add storage when needed, and control costs through automation.

In this step-by-step guide, I’ll show you exactly how I:

Moved a VM to a secure subnet

Scaled it vertically for more computing power

Added extra storage space with a data disk

Set up automatic shutdown to save money

Each step includes a screenshot so you can follow along.

Scenario
An Azure Administrator asked me to:

Move a Linux VM into a secure subnet (created earlier) for FTP traffic.

Increase its computing power to handle more workload.

Attach a new disk for file uploads.

Configure an automatic shutdown schedule to reduce costs.

Step 1: Move the VM to a New Subnet

Log in to the Azure Portal.

Search for Virtual machines and open your VM (guided-project-vm).

If the VM is running, click Stop and wait for the status to change to Stopped (deallocated).

Go to Networking in the left menu and click the Network interface/IP configuration link.

Change the Subnet to ftpSubnet.

Click Apply.

Now your VM is connected to a subnet with specific security rules for FTP traffic.

Step 2: Scale the VM Vertically

In your VM’s menu, go to Availability + scale → Size.

Choose D2s_v5 (or a close alternative like D2s_v3 if not available).

Click Resize.

Scaling vertically increases your VM’s CPU and memory so it can handle more tasks.

Step 3: Attach a New Data Disk

In the VM menu, select Disks.

Click + Create and attach a new disk.

Configure:

Disk name: ftp-data-disk

Size: 20 GB

Leave LUN and storage type as default.

Click Apply.

This gives your VM extra storage space for file uploads or other data.

Step 4: Set Up Automatic Shutdown

In the VM menu, go to Operations → Auto-shutdown.

Enable the shutdown schedule.

Set the time to 7:15 PM UTC.

Click Save.

Automatic shutdown helps you avoid paying for unused compute time.

Final Outcome

After completing these steps, the VM is now:

Connected to a secure, FTP-ready subnet

Running on a more powerful configuration

Equipped with extra storage capacity

Set to automatically shut down to control costs

Why This Is Important

In the real world, cloud management isn’t just about deployment — it’s about optimizing resources for security, performance, and cost-efficiency.

Whether you’re preparing for a cloud certification, managing a small test environment, or running production workloads, these skills will help you:

Keep workloads secure in dedicated subnets

Adjust performance as needs change

Add storage without downtime

Cut costs through automation

azure virtual machine tutorial, move azure vm subnet, azure vm resize, azure attach disk, azure auto shutdown, azure cloud optimization, secure azure vm, azure storage disk tutorial, azure performance tuning

Azure #CloudComputing #VirtualMachines #Networking #CloudSecurity #AzureVM #DevOps #SysAdmin #CloudEngineer #CloudOptimization #ITInfrastructure

Similar Posts