Ojasa Mirai

Ojasa Mirai

Cloud

Loading...

Learning Level

🟢 Beginner🔵 Advanced
🔧 Azure Account Setup⚙️ Azure Compute Overview🖥️ Virtual Machines🎯 App Service Deployment⚡ Azure Functions📁 Blob Storage🗄️ Azure SQL Database📊 Cosmos DB📊 Azure Monitoring🔑 Azure Identity & Access📈 Azure Scaling & Load Balancing🐳 Azure Containers & AKS🎯 Azure Static Web Apps💰 Azure Cost Optimization
Cloud/Azure Deployment/Virtual Machines

🖥️ Virtual Machines

Introduction

Azure Virtual Machines provide on-demand computing resources with the flexibility to choose operating system, runtime, and configuration.

Key Learning Outcomes

By the end of this lesson, you'll understand:

  • Creating and managing VMs
  • Connecting to VMs via SSH/RDP
  • Managing disks and storage
  • VM sizing and performance
  • Backup and disaster recovery
  • Networking configuration

Creating a Virtual Machine

# Create resource group
az group create --name myResourceGroup --location eastus

# Create VM
az vm create \
  --resource-group myResourceGroup \
  --name myVM \
  --image UbuntuLTS \
  --admin-username azureuser \
  --generate-ssh-keys \
  --size Standard_B2s \
  --public-ip-sku Standard

Connecting to VM

SSH Connection (Linux)

# Get public IP
az vm show --name myVM --resource-group myResourceGroup \
  --query publicIps --output tsv

# SSH into VM
ssh azureuser@<public-ip>

RDP Connection (Windows)

# Create Windows VM
az vm create \
  --resource-group myResourceGroup \
  --name myWindowsVM \
  --image Win2019Datacenter \
  --admin-username azureuser \
  --admin-password MyPassword123! \
  --size Standard_B2s

# Get RDP file
az vm open-port --name myWindowsVM \
  --resource-group myResourceGroup \
  --port 3389

Managing VMs

# Start VM
az vm start --name myVM --resource-group myResourceGroup

# Stop VM
az vm stop --name myVM --resource-group myResourceGroup

# Deallocate VM (stop billing)
az vm deallocate --name myVM --resource-group myResourceGroup

# Delete VM
az vm delete --name myVM --resource-group myResourceGroup

VM Sizing

# List available sizes
az vm list-sizes --location eastus

# Resize VM (must be stopped first)
az vm deallocate --name myVM --resource-group myResourceGroup

az vm resize --resource-group myResourceGroup \
  --name myVM \
  --size Standard_B2s

az vm start --name myVM --resource-group myResourceGroup

Disks and Storage

# Create data disk
az vm disk attach \
  --resource-group myResourceGroup \
  --vm-name myVM \
  --name myDataDisk \
  --size-gb 128

# List disks
az disk list --resource-group myResourceGroup

# Snapshot disk
az snapshot create \
  --resource-group myResourceGroup \
  --name mySnapshot \
  --source myDataDisk

Key Takeaways

  • **VMs** provide full control over OS and configuration
  • **SSH/RDP** connect to running VMs
  • **Sizing** impacts performance and cost
  • **Disks** expand storage capacity
  • **Snapshots** enable backup and recovery

Next Steps

Learn about App Service for managed web applications, or explore AKS for container orchestration.


Resources

Python Docs

Ojasa Mirai

Master AI-powered development skills through structured learning, real projects, and verified credentials. Whether you're upskilling your team or launching your career, we deliver the skills companies actually need.

Learn Deep • Build Real • Verify Skills • Launch Forward

Courses

PythonFastapiReactJSCloud

© 2026 Ojasa Mirai. All rights reserved.

TwitterGitHubLinkedIn