DEV Community

Cover image for Managing Azure Virtual Machines: A Hands-On Guide to Networking, Scaling, Storage, and Auto-Shutdown
Oladimeji Zainab
Oladimeji Zainab

Posted on

Managing Azure Virtual Machines: A Hands-On Guide to Networking, Scaling, Storage, and Auto-Shutdown

Introduction.

Managing virtual machines efficiently is an essential skill for anyone working with Microsoft Azure. Beyond simply creating a VM, administrators often need to modify its network configuration, scale its compute resources to meet changing workloads, expand storage capacity, and implement cost-saving measures such as automatic shutdown.

In this hands-on guide, I'll walk through the practical steps I performed to manage an Azure Virtual Machine using the Azure portal. Specifically, you'll learn how to move a VM to a different subnet, vertically scale the VM to a larger size, attach a new data disk for additional storage, and configure automatic shutdown to help reduce unnecessary Azure costs. Whether you're preparing for the AZ-104 certification or building your Azure administration skills, these tasks represent common real-world VM management operations you'll encounter in cloud environments.

Move the virtual machine network to the new subnet

  • From the Azure portal home page, in the search box, enter virtual machines and Select virtual machines under services.

format

  • Select the guided-project-vm virtual machine.

format

  • If the virtual machine is running, select Stop.

format

  • Wait for the Status field to update and show Stopped (deallocated).

format

format

  • Within the Networking subsection of the menu, select Network settings.

format

  • Select the Network interface / IP configuration hyperlink for the VM.

format

  • On the IP Configurations page, update the Subnet to ftpSubnet.

format

  • Select Apply.

format

  • Select Home to return to the Azure portal home page.

format

Vertically scale the virtual machine.

  • From the Azure portal home page, in the search box, enter virtual machines.

format

  • Select the guided-project-vm virtual machine.

format

  • Locate the Availability + scale submenu and select Size.

format

  • Select a new VM size D2s_v3 for example. (Note: If you don’t see the same size as shown in this exercise, select something similar.)

format

  • Select Resize

format

Attach data disks to a virtual machine

  • From the Azure portal home page, in the search box, enter virtual machines.

format

  • Select the guided-project-vm virtual machine.

format

  • Locate the settings submenu and select Disks.

format

  • Select Create and attach a new disk.

format

  • Leave LUN as default.

format

  • Enter ftp-data-disk for the Disk name.

format

  • Leave the Storage type as default.

format

  • Enter 20 for the Size

format

  • Select Apply to create the new storage disk and attach the disk to the machine.

format

Configure automatic shutdown on a virtual machine.

  • From the Azure portal home page, in the search box, enter virtual machines.

format

  • Select the guided-project-vm virtual machine.

format

  • Under the Operations submenu, select Auto-shutdown.

format

  • In order to let late uploads finish, set the Scheduled shutdown to 7:15:00 PM.

![format(https://dev-to-uploads.s3.us-east-2.amazonaws.com/uploads/articles/iv6apbtk2ah284fntbvt.png)

  • Select Save.

format

Conclusion.

Successfully managing Azure Virtual Machines goes far beyond deployment—it involves continuously optimizing networking, performance, storage, and operational costs. In this walkthrough, we covered how to migrate a VM to a new subnet, resize it to accommodate increased workloads, attach additional storage using a managed data disk, and configure automatic shutdown to avoid unnecessary compute charges.

These are fundamental Azure administration tasks that every cloud engineer should be comfortable performing. Mastering them not only improves your understanding of Azure infrastructure but also prepares you for real-world production environments where virtual machines must be maintained efficiently and cost-effectively.

I hope this guide helps you follow along with your own Azure lab or learning journey. If you found it useful, feel free to leave a comment, share your experience, or connect with me here on Dev.to. Happy learning and happy building!

Top comments (1)

Collapse
 
zainab_oladimeji profile image
Oladimeji Zainab

Managing Azure Virtual Machines is more than just provisioning resources—it requires understanding how networking, scaling, storage, and cost optimization work together in real-world environments. This walkthrough covers several common administrative tasks that cloud engineers perform regularly. I'd be interested to hear how others approach VM management in Azure or whether you have additional best practices you've found valuable in production environments.