Exercise: Create a VM

Natasha Ong
This is some text inside of a div block.
4 min read

Exercise Overview:

Let's say we want to create a VM that runs a web server on Ubuntu*. Sure, setting up a website isn't difficult, but there are a few things to consider. Just like a normal computer, we need to install and configure an operating system, configure website, install a database, and set up firewalls.

*Ubuntu is an operating system, meaning it's a software that makes your computer work (think of it as the brains of your computer). Similar to Windows or macOS, which are other operating systems, you can use it to browse the internet, create documents, and more. It works on many types of computers, and it's great for everyone, whether you're new to computers or an advanced pro. Fun fact: Ubuntu is based on the Linux operating system! For more details, visit https://ubuntu.com/.

In this exercise, you will:

1. Create an Azure VM using the Azure Portal.

2. Configure the VM specification

3. Check the deployed VM

Task 1: Create an Azure VM with the Azure portal

1. Begin by signing in to the Azure portal.

2. Once you're in the Azure portal,  and observe the Azure services section on the home page. Here, you'll find plenty of options to explore. But for now, we'll focus on creating a virtual machine.

3. Click on Create a resource. This action will lead us to the Create a resource pane, and it's where the everything begins. You'll see a lineup of popular Azure services, and let's focus on Virtual Machines section.

4. Now, with Virtual Machines selected, the Create virtual machine pane is our option to choose from. Click the Create button. This is where we will work and craft your very own virtual machine.

Task 2: Configure the VM

You need to configure the basic details of your virtual machine. It's fine if some of the options at this point are unfamiliar to you. Later in the course, we'll go over all of these options. You're welcome to duplicate the details used below.

1. On the Basics tab, enter the following details for each field.

Note that your subscription name and resource group name might be different - and that's okay! Any subscription/resource group works for this exercise.

2. There are several other tabs you can look through to see what settings you can change during the VM creation process. After you've finished exploring, click Review + create to go over the settings and validate them.

3. Azure validates your resource configuration settings before creating it. Based on the requirements of the image creator built into Azure, you may need to provide some additional information. It's as simple as opening the tab with the error. Check that all of the settings are correct, and then click Create to deploy and create the VM.

4. The Generate new key pair window appears. Select Download private key and create resource.

5. You can track the deployment in the Deployment details on the Overview pane or through the Notifications pane (select the bell icon in the top right corner of the portal).

The VM deployment process can take a couple of minutes to complete. You'll get a notification when the deployment is complete.

Task 3: Check the deployed VM

1. Select Go to resource. The Overview page of your VM appears.

Here, you can see all the information and configuration options for your newly created Ubuntu VM. One of the important information here is the Public IP address*.

*In Azure, when you deploy a VM, it is assigned a Public IP address automatically. We'll dive into the concept of IP addresses soon, but for now, having a public IP address means you can access your VM from the internet. Try copying the IP address and pasting it into your web browser, and notice what you see!

Task 4: Delete the VM

Don't forget to delete unwanted resources! See if you can delete this VM on your own without any guidance, and reach out to the NextWork community if you get stuck. 🤝

Congratulations! With a few steps in the Azure portal, you've deployed a VM that runs on Linux. Nice work!