DEV Community

Cover image for Manage Virtual Machines
lotanna obianefo
lotanna obianefo

Posted on

Manage Virtual Machines

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 the previous exercise.

Move the virtual machine network to the new subnet

Login to Microsoft Azure at https://portal.azure.com
From the Azure portal home page, in the search box, enter virtual machines.
Select virtual machines under services.
Select the project-vm virtual machine.
jhtf6
If the virtual machine is running, select Stop.
uh6de43
Wait for the Status field to update and show Stopped (deallocated).
ugtrrde654
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.
t76r5dyt
gfds44545

Good, Just completed migrating the VM from one subnet to another. Remember, the new subnet had specific network security rules applied to help it function as an FTP server.

The next task from the Azure admin relates to the computing power of the VM. The admin would like you to vertically scale the machine to increase the computing power.

Vertically scale the virtual machine

From the Azure portal home page, in the search box, enter virtual machines.
Select virtual machines under services.
Select the project-vm virtual machine.
Locate the Availability + scale submenu and select Size.
jxwe3
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.
kw432
Remember, The VM size may not update in the Azure UI until the VM is restarted. 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

From the Azure portal home page, in the search box, enter virtual machines.
Select virtual machines under services.
Select the project-vm virtual machine.
Locate the settings submenu and select Disks.
hjgrd5er
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.
8u54rd
Now the VM has enough storage to handle some uploads.

The final thing you should be 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

From the Azure portal home page, in the search box, enter virtual machines.
Select virtual machines under services.
Select the 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.
KWR42

You’ve successfully completed all of the management tasks the Azure admin needed a hand with for the virtual machine.

Top comments (0)