A Virtual Machine (VM) is a software-based computer that runs an operating system (OS) and applications, just like a physical computer. The key difference is that a VM is hosted on a physical server and managed through a virtualization layer called a hypervisor. In simple term, A virtual machine is a computer inside a computer.
To manage the virtual machine, With the network settings updated to support segmenting the Linux virtual machine, you’re ready to manage the virtual machine itself. The first thing the Azure admin asks you to complete is moving the virtual machine to the new subnet you created in when updating the virtual network. Then secondly to vertically scale the virtual machine. Next is to attach data disks to the virtual machine and finally configure automatic shutdown on a virtual machine.
Move the virtual machine network to the new subnet
To move the virtual machine to the new subnet, follow these steps:
1.Login to Microsoft Azure at https://portal.azure.com
2.From the Azure portal home page, in the search box, enter virtual machines
3.Select virtual machines under services. Select the guided-project-vm virtual machine
4.If the virtual machine is running, select Stop.
5.Wait for the Status field to update and show Stopped (deallocated)
6.Within the Networking subsection of the menu, select Network settings
7.Select the Network interface / IP configuration hyperlink for the VM
8.On the IP Configurations page, update the Subnet to ftpSubnet
9.Select Apply
Vertically scale the virtual machine
To vertically scale the virtual machine, follow these steps:
1.From the Azure portal home page, in the search box, enter virtual machines
2.Select virtual machines under services. Select the **guided-project-vm **virtual machine
3.Locate the Availability + scale submenu and select Size
4.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.
5.Select Resize
7.Select Home to return to the Azure portal home page
With the VM scaled up to a more robust processor, it can handle the new role it’s being assigned. However, now the Azure admin realizes that if the VM is going to server as an FTP server, it needs more storage. The Azure admin asked you to attach a new data disk to the VM.
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. Select the guided-project-vm virtual machine
3.Locate the settings **submenu and select **Disks
4.Select Create and attach a new disk
5.Leave LUN as default. Enter ftp-data-disk for the Disk name. Leave the Storage type as default. Enter 20 for the Size.
6.Select Apply to create the new storage disk and attach the disk to the machine.
7.Select Home to return to the Azure portal home page.
Now the VM has enough storage to handle some uploads. The final thing the Azure admin is concerned about is the cost of running the computer 24 hours a day. The first thing they’ll do every morning is start up the FTP server. However, they’d like you to configure it to automatically shutdown every day at 7 PM Coordinated Universal Time (UTC).
Configure automatic shutdown on a virtual machine
To configure automatic shutdown on a virtual machine, you follow these steps;
1.From the Azure portal home page, in the search box, enter virtual machines
2.Select virtual machines under services. Select the guided-project-vm virtual machine
3.Under the Operations submenu, select Auto-shutdown
4.In order to let late uploads finish, set the Scheduled shutdown to 7:15:00 PM. Select Save
Top comments (2)
Are there any real benefits to using Azure Virtual Machines instead of Docker containers or Azure Container Apps? Since Microsoft is pushing everything toward containers, is there still a good reason to choose VMs for new projects?
sharp!