DEV Community

Cover image for How to Manage virtual machines
Oluwanifesimi
Oluwanifesimi

Posted on

How to Manage virtual machines

Microsoft Azure is a cloud platform where you can run virtual computers, store data, build apps, and use AI—without needing physical servers. It's like renting powerful tech tools online to get things done faster and smarter.

what is virtual machine?

A virtual machine (VM) is like a computer inside your computer. It’s a software-based system that acts like a real physical computer, running its own operating system and apps independently. It operates in an isolated environment, allowing multiple VMs to run on a single physical computer or server while sharing its resources (CPU, memory, storage, etc.). In this guide, we’ll walk you through the steps to create a virtual machine in Azure using the Azure Portal.

step by step on how to manage virtual machines:

step 1:Move the virtual machine network to the new subnet

  • Login to Microsoft Azure at https://portal.azure.com login
  • From the Azure portal home page, in the search box, enter virtual machines.
  • Select virtual machines under services. virtual machine search
  • Select the guided-project-vm virtual machine.
    select vm

  • If the virtual machine is running, select Stop.
    stop vm
    Note: You can request a subnet change for a VM without stopping it first, but Azure will automatically force a restart before completing the change. The VM restart is required and cannot be avoided.

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

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

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

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

  • Select Apply
    ftpsubnet

  • Select Home to return to the Azure portal home page

Step 2:Vertically scale the virtual machine

  • From the Azure portal home page, in the search box, enter virtual machines.
  • Select virtual machines under services. vms
  • Select the guided-project-vm virtual machine. select vm
  • Locate the Availability + scale submenu and select Size.
  • Select a new VM size D2s_v5 for example. (Note: If you don’t see the same size as shown in this exercise, select something similar.)
  • Select Resize. resizing
  • Select Home to return to the Azure portal home page

Step 3:Attach data disks to a virtual machine

  • From the Azure portal home page, in the search box, enter virtual machines.
  • Select virtual machines under services. sel
  • Select the guided-project-vm virtual machine. guided vm
  • Locate the settings submenu and select Disks
  • Select Create and attach a new disk. create new disk
  • Leave LUN as default.
  • Enter ftp-data-disk for the Disk name.
  • Leave the Storage type as default.
  • Enter 20 for the Size.
  • Select Apply to create the new storage disk and attach the disk to the machine.
    apply

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

step 4:Configure automatic shutdown on a virtual machine

  • From the Azure portal home page, in the search box, enter virtual machines.
  • Select virtual machines under services. manage vm 4
  • Select the guided-project-vm virtual machine. guide select
  • Under the Operations submenu, select Auto-shutdown.
  • on the auto shutdown, in order to edit.
  • In order to let late uploads finish, set the Scheduled shutdown to 7:15:00 PM.
  • Select Save.
    auto shutdown

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

Final Thoughts

Managing virtual machines in Microsoft Azure doesn’t have to be intimidating. As you’ve seen in this guide—from network configuration and scaling to disk attachments and scheduled shutdowns—Azure offers intuitive tools to keep your VM environment flexible, efficient, and secure. Whether you're running a small personal project or scaling enterprise-grade infrastructure, mastering VM management empowers you to optimize performance and cost-effectiveness.

Keep exploring, keep experimenting, and remember—every click in the Azure portal is another step forward in your cloud journey.

Top comments (0)