Featured resource
2025 Tech Upskilling Playbook
Tech Upskilling Playbook

Build future-ready tech teams and hit key business milestones with seven proven plays from industry leaders.

Check it out
  • Lab
    • Libraries: If you want this lab, consider one of these libraries.
    • Cloud
Azure icon
Labs

Creating a Linux VM using Azure CLI

In this hands-on lab, we play the part of a Cloud Engineer who is tasked with using the Azure CLI to provision a Linux-based virtual machine running Nginx. This VM is intended for our web development team's newest project. In this hands-on lab, we cover Azure CLI syntax, Azure CLI help/parameters, and Network Security Groups.

Azure icon
Lab platform
Lab Info
Level
Beginner
Last updated
Sep 21, 2025
Duration
30m

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.
Table of Contents
  1. Challenge

    Create a Virtual Machine

    Create a Virtual Machine Using Azure CLI and the Following Settings:

    • Resource Group: (Existing resource group)
    • Name: LabVM
    • Image: UbuntuLTS
    • Admin Username: azureuser
    • Authentication Method: Generate SSH Keys

    Note: The resource group has already been created for you.

    1. Login to the Azure Portal using the credentials provided in this hands-on lab.
    2. Navigate to the Cloud Shell, using the >_ icon in the toolbar on the top-right side of the screen.
    3. Ensure you are using PowerShell for Azure Cloud Shell.
    4. Click Show advanced settings.
    5. Use the existing Resource Group.
    6. Choose the Cloud Shell Region that matches the location of your lab provided Resource Group.
    7. Under the Storage account section select Use existing.
    8. Under the File share section select Create new and type in cloudshell.
    9. Select Attach storage.
    10. Once Cloud Shell has opened, identify the existing Resource Group using az group list.
    11. Copy the value of the name: field. This is the Resource Group name.
    12. Set the Resource Group variable by typing $rg = "<insert-resource-group-name>" and press Enter.
    13. Set the virtual machine's name by creating its variable with $vm = "kaldiVM".
    14. Deploy a virtual machine (VM) by typing: az vm create -g $rg -n $vm --image "UbuntuLTS" --admin-username "azureuser" --generate-ssh-keys
    15. After the VM is created copy the publicIPAddress for later use.
  2. Challenge

    Open Port 80 On the VM for Web Traffic

    Open Port 80 on VM using Azure CLI

    1. Open port 80 on the VM we created: az vm open-port -g $rg -n $vm --port 80
    2. Install Nginx by first logging into the server. Don't forget to accept the fingerprint: ssh azureuser@<PubliIP.OF.VM>
    3. Update the Ubuntu VM: sudo apt update -y
    4. Install Ngnix: sudo apt-get install nginx -y
    5. Navigate to the web browser and paste in the VM's IP address. If successful, the default "Welcome to Nginix!" page appears.
About the author

Pluralsight Skills gives leaders confidence they have the skills needed to execute technology strategy. Technology teams can benchmark expertise across roles, speed up release cycles and build reliable, secure products. By leveraging our expert content, skill assessments and one-of-a-kind analytics, keep up with the pace of change, put the right people on the right projects and boost productivity. It's the most effective path to developing tech skills at scale.

Real skill practice before real-world application

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Learn by doing

Engage hands-on with the tools and technologies you’re learning. You pick the skill, we provide the credentials and environment.

Follow your guide

All labs have detailed instructions and objectives, guiding you through the learning process and ensuring you understand every step.

Turn time into mastery

On average, you retain 75% more of your learning if you take time to practice. Hands-on labs set you up for success to make those skills stick.

Get started with Pluralsight