DEV Community

Cover image for Azure Management Task 3: Managing Virtual Machines
Peter Olanrewaju Fadeyi
Peter Olanrewaju Fadeyi

Posted on

Azure Management Task 3: Managing Virtual Machines

Introduction

In the previous task, we updated the virtual network by creating a new subnet and configuring a network security group to control inbound traffic. This network segmentation allows workloads to be isolated and managed more securely within Microsoft Azure.

With the network configuration in place, the next step is to manage the virtual machine itself. Cloud administrators often need to adjust virtual machine settings to meet changing workload requirements, optimize performance, or reduce operational costs.

In this task, we will move the existing virtual machine to the newly created subnet, resize the virtual machine to provide additional resources, attach a new data disk for storage, and configure automatic shutdown to control daily operating costs. These tasks simulate common administrative operations performed when managing compute resources in a cloud environment.

Steps

1. Move the virtual machine network to the new subnet

  • Login to Microsoft Azure at https://portal.azure.com

  • From the Azure portal home page, search for and select virtual machines.

vm

  • Select the virual machine created earlier. Example:
guided-project-vm
Enter fullscreen mode Exit fullscreen mode
  • If the VM is running, select Stop and confirm the prompt.

stop

  • Wait until the Status field shows:
Stopped (deallocated)
Enter fullscreen mode Exit fullscreen mode
  • Under the Networking section, select Network settings.

  • Click the Network interface / IP configuration link.

interface

  • On the IP Configurations page, update Subnet to:
ftpSubnet
Enter fullscreen mode Exit fullscreen mode
  • Select Apply.

configuration

2. Vertically scale the virtual machine

Scalling a Virtual Machine allows administrator to increase computer resources such as CPU and memory.

  • From the Azure portal home page, search for and select virtual machines.

vm

  • Select the virtual machine:
guided-project-vm
Enter fullscreen mode Exit fullscreen mode

vm

  • Under Availability + scale, select Size.

  • Choose a larger VM size such as:

D2s_v5
Enter fullscreen mode Exit fullscreen mode
  • Select Resize. (If this exact size is unavailable in your region, select a similar option.)

resize

3. Attach a data disk to the virtual machine

Additional disks can be attached to increase storage capacity.

  • Navigate through the Azure portal and select the VM:
guided-project-vm
Enter fullscreen mode Exit fullscreen mode
  • Under settings, select Disks.

disks

  • Select + Create and attach a new disk.

  • Enter the following:


Disk name: ftp-data-disk
Size: 20 Gib
Enter fullscreen mode Exit fullscreen mode
  • Leave the remaining settings as defaults.

  • Select Apply to create the and attach the disk.

size

The VM now has additional strage available to support

4. Configure automatic shutdown

Automatic shutdown helps reduce cloud cost by turning off unused resources.

  • Navigate to the virtual machine:
guided-project-vm
Enter fullscreen mode Exit fullscreen mode
  • Under the Operations, select Auto-shutdown.

  • Set shutdown time to :

7:15:00 PM
Enter fullscreen mode Exit fullscreen mode
  • Select Save.

time

This ensures the virtual machine automatically stops at the time each day.

Conclusion

In this exercise, we performed several management operations on the virtual machine. First, we moved the VM to the newly created subnet to ensure it operates within the correct network segment. We then vertically scaled the virtual machine to provide additional compute resources.

To support file uploads, we attached a new data disk to increase storage capacity. Finally, we configured automatic shutdown to help reduce operational costs by ensuring the virtual machine does not run continuously when it is not needed.

In the next task, we will focus on controlling storage access, including managing permissions and securing access to storage containers and file shares.

Top comments (0)