DEV Community

Cover image for Create a Resource Group and Launch a Virtual Machine Using Azure CLI
Gbadamosi Tajudeen
Gbadamosi Tajudeen

Posted on

Create a Resource Group and Launch a Virtual Machine Using Azure CLI

  • Configure and install Azure CLI: Follow the procedures in the link below to install Azure CLI. [(https://docs.microsoft.com/cli/azure/install-azure-cli)] After installation, launch the terminal (Window Powershell) and sign in to your Azure account using the Username (e.g. “azstudent@74.235.163.162” and password (e.g. “Password123”) and following the displayed command to create a resource group and run a virtual machine (VM):

Username extracted from Azure account

  • Create a resource group: Choose a name for your resource group (e.g. "adex") and identify a desired Azure Region as location (e.g. "eastUS") and input the following command to create the resource group: az group create --name adex --location eastUS

Command for creating resource group

  • Create a virtual machine: Choose a name for your virtual Machine (e.g. “matrix”) and input the following command to create the virtual machine within the resource group by replacing resource-group (e.g. “adex”), (e.g. name “matrix”), and image (“UbuntuLTS”): az vm create --resource-group adex --name matrix --image UbuntuLTS --generate-ssh-keys

Command for creating VM

  • After the installation and configuration, you will have a resource group and a virtual machine set up in your Azure environment. To minimize expenses, keep in mind to delete resources when they are no longer needed.

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

RSVP here →

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay