DUMB DEV Community

Cover image for Manage virtual machines
okunola babatunde
okunola babatunde

Posted on

Manage virtual machines

Managing virtual machines in Azure isn’t just about creating them—it’s about placing them strategically within the network for efficiency and visibility. After updating network settings to support subnet segmentation, I moved an existing Linux VM to a newly created subnet. This ensures better traffic isolation, simplifies monitoring, and lays the groundwork for scalable deployments.

Migrating the VM to its dedicated subnet preserved the integrity of the existing network while enhancing visibility into its resource utilisation and network flow. Proactive network management like this, keeps the cloud environment organised, secure, and easier to maintain.Here, these procedures guide you on how to do it yourself in a less stressful way.

Move the virtual machine network to the new subnet

  1. Login to Microsoft Azure at (Azure Portal)[https://portal.azure.com]
  2. From the Azure portal home page, in the search box, enter virtual machines.
  3. Select virtual machines under services.
  4. Select the guided-project-vm virtual machine.
  5. If the virtual machine is running, select Stop.  ## Note: In order to make some configuration changes, such as changing the subnet, the VM will need to be restarted. You can request the change without stopping the VM, but Azure will force a restart before completing the change.
  6. Wait for the Status field to update and show Stopped (deallocated).
  7. Within the Networking subsection of the menu, select Network settings.
  8. Select the Network interface / IP configuration hyperlink for the VM.
  9. On the IP Configurations page, update the Subnet to ftpSubnet.
  10. Select Apply.  11. Select Home to return to the Azure portal home page.

Vertically scale the virtual machine

  1. From the Azure portal home page, in the search box, enter virtual machines.
  2. Select virtual machines under services.
  3. Select the guided-project-vm virtual machine.
  4. Locate the Availability + scale submenu and select Size.  5. 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.)
  5. Select Resize.
  6. Select Home to return to the Azure portal home page.

Attach data disks to a virtual machine

  1. From the Azure portal home page, in the search box, enter virtual machines.
  2. Select virtual machines under services.
  3. Select the guided-project-vm virtual machine.
  4. Locate the settings submenu and select Disks.  5. Select Create and attach a new disk.
  5. Leave LUN as default.
  6. Enter ftp-data-disk for the Disk name.
  7. Leave the Storage type as default.
  8. Enter 20 for the Size.
  9. Select Apply to create the new storage disk and attach the disk to the machine.  11. Select Home to return to the Azure portal home page.

Configure automatic shutdown on a virtual machine

  1. From the Azure portal home page, in the search box, enter virtual machines.
  2. Select virtual machines under services.
  3. Select the guided-project-vm virtual machine.
  4. Under the Operations submenu, select Auto-shutdown.  5. In order to let late uploads finish, set the Scheduled shutdown to 7:15:00 PM.
  5. Select Save.
  6. Select Home to return to the Azure portal home page.

Conclusion:

Using dedicated subnets for VMs is a straightforward, yet impactful practice in Azure. It enables workload isolation, better performance monitoring, and future-proofing of the infrastructure—keeping operations smooth and manageable.

Top comments (1)

Collapse
 
realcloudprojects profile image
SKILL.SCH

welldone