Scenario
Now that the network has been configured to support segmentation, the next step is to manage the virtual machine. The Azure Administrator has requested that the existing Linux virtual machine be moved to the newly created subnet from the previous exercise.
Note: This is a continuation of the project from the previous article.
Move the Virtual Machine to the New Subnet
- From the Virtual Machines page in the Azure Portal, locate and select the guided-project-vm virtual machine to begin updating its network configuration.
If the virtual machine is currently running, select Stop. Some configuration changes—such as modifying the subnet—require the VM to be restarted. While you can submit the change without stopping it manually, Azure will automatically restart the VM before applying the update.
Wait until the Status field changes to Stopped (deallocated) before proceeding.
- Within the Networking subsection of the menu, select Network settings.
- Select the Network interface / IP configuration hyperlink for the VM.
- On the IP Configurations page, update the Subnet to ftpSubnet.
- Select Apply.
The virtual machine has been moved from one subnet to another, with the new subnet configured with specific network security rules to support its role as an FTP server. The next task from the Azure administrator is to adjust the VM’s computing capacity by vertically scaling it to enhance its performance.
Vertically scale the virtual machine
- From the Virtual Machine page, select the guided-project-vm virtual machine.
- Locate the Availability + scale submenu and select Size.
- Select a new VM size L2aos_v4, for example. (Note: If you don’t see the same size as shown in this exercise, select something similar.)
- Select Resize
Now that the VM has been upgraded to a more powerful processor, it is capable of supporting its new role. However, the Azure administrator has identified that, to function effectively as an FTP server, the VM requires additional storage. To address this, a new data disk must be attached to the virtual machine.
Attach data disks to a virtual machine
- From the Virtual Machine page, select the guided-project-vm virtual machine.
- Locate the settings submenu and select Disks.
- Select Create and attach a 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.
The VM now has sufficient storage to support file uploads. The final concern for the Azure administrator is the cost of keeping the machine running շուրջ the clock. They plan to start the FTP server manually each morning, but want to set it up to automatically shut down every day at 7:00 PM Coordinated Universal Time (UTC).
Configure automatic shutdown on a virtual machine
- From the Virtual Machines page, select the guided-project-vm virtual machine.
- Under the Operations submenu, select Auto-shutdown.
- In order to let late uploads finish, set the scheduled shutdown to 7:15:00 PM.
- Select Save.
The Azure admin has completed all of the management tasks needed for the virtual machine.
Summary
In this project, we effectively managed virtual machines (VMs) by completing key operational tasks. We showed how to move a VM to a designated subnet to improve network segmentation and security. We then applied vertical scaling to align the VM’s resources with workload requirements, enhancing overall performance. In addition, we expanded storage capacity by attaching a data disk to support applications and data needs. Lastly, we configured an auto-shutdown schedule to reduce costs by ensuring the VM is turned off during non-working hours. Together, these actions demonstrate best practices in VM lifecycle management, balancing performance, scalability, and cost efficiency.














Top comments (0)