MSDN Documentation

Azure Virtual Machine (VM) Guide

Welcome to the comprehensive guide for deploying and managing Azure Virtual Machines. This document provides essential information for developers, administrators, and IT professionals looking to leverage the power and flexibility of Microsoft Azure for their compute needs.

What is an Azure VM?

An Azure Virtual Machine (VM) is an on-demand, scalable computing resource that Azure offers. You can think of an Azure VM as your own personal computer in the cloud. It's a flexible, powerful, and economical option for publishing applications and hosting workloads. Azure VMs offer the control of a physical datacenter combined with the scalability of cloud computing.

Key Concepts

Getting Started with Azure VMs

Follow these steps to create your first Azure VM:

  1. Sign in to the Azure portal: Navigate to https://portal.azure.com/ and log in with your Azure account.
  2. Create a resource: Click on "Create a resource" and search for "Virtual machine".
  3. Configure VM settings:
  4. Review and create: Once configured, review your settings and click "Create".

Common VM Operations

Starting, Stopping, and Restarting

You can manage the lifecycle of your VM directly from the Azure portal. Select your VM, and you'll find options to Start, Stop, or Restart the machine.

Connecting to your VM

For Windows VMs: Use Remote Desktop Connection (RDP). You'll need the public IP address of your VM and the administrator credentials you set during creation.

# Example of connecting via RDP (Windows)
mstsc /v:YOUR_VM_PUBLIC_IP_ADDRESS
        

For Linux VMs: Use SSH. You can connect using your public IP address and SSH credentials (username/password or SSH key).

# Example of connecting via SSH (Linux)
ssh your_username@YOUR_VM_PUBLIC_IP_ADDRESS
        

Scaling Your VM

Azure VMs can be scaled up (increasing CPU/memory) or scaled out (adding more VM instances). This can be done manually through the portal or automatically using Virtual Machine Scale Sets.

Choosing the Right VM Size

Azure offers a wide range of VM sizes optimized for different workloads. Here's a simplified overview:

Category Use Case Example Sizes
General Purpose Web servers, small-to-medium databases, development/test environments Dsv3, Esv3
Compute Optimized High-performance web servers, batch processes, application servers Fsv2
Memory Optimized Large relational database servers, in-memory caches, analytics Mv2, Ev3
Storage Optimized High I/O and throughput for databases, Big Data, and large analytics workloads Lsv2

Note: Always refer to the official Azure VM documentation for the most up-to-date list of VM sizes and their specifications.

Security Best Practices

Next Steps

Explore the following resources to deepen your understanding: