- Basics: subscription, resource group, region, VM name, image, size, authentication, and inbound port rules.
- Disks: OS disk type/size and optional data disks.
- Networking: virtual network, subnet, NIC, network security group (NSG), public IP, and load balancer placement.
- Management & Monitoring: diagnostics, Defender for Cloud, Azure AD login, managed identity, backup, auto-shutdown, and extensions.
- Advanced & Tags: post-deployment extensions and tags for organization and billing.
Choose a VM size based on CPU, memory, disk throughput and cost. For production workloads, plan for redundancy using availability zones or availability sets and check regional SKU availability.
Availability and size selection: click “See all sizes” to view SKU options and filters (e.g., General purpose). For test workloads, economical options like
B1s can be appropriate. For production, select a family and size that match CPU, memory, disk IOPS and networking requirements.
Authentication and inbound ports: for Linux prefer SSH keys (--generate-ssh-keys in CLI) and for Windows use secure practices or Azure AD login where possible. Only open ports you need — restricting management ports reduces risk.
Only open the ports you need. Exposing management ports (SSH/RDP) to the internet increases attack surface — restrict access with NSG rules, service endpoints, or Just-In-Time access where possible.


- OS disk: set type and minimum size (typically 30 GB for many images).
- Data disks: attach additional managed disks for application or database storage.
- Encryption/KMS: use platform-managed keys by default, or configure customer-managed keys (CMK) with Azure Key Vault for extra control.

- Virtual network & subnet: select existing vNet or create a new one.
- Public IP address: optional; consider using private IP only for backend VMs.
- Network Security Group (NSG): define inbound/outbound rules to restrict traffic.
- Load balancer/Application Gateway: place VMs behind these for scale or web traffic management.
- Defender for Cloud: enable security recommendations and controls.
- Identity: assign a system-assigned or user-assigned managed identity for resource access without credentials.
- Azure AD login: enable Azure AD authentication for supported OS images.
- Auto-shutdown: schedule shutdown for non-production VMs to save costs.
- Backup: enable Azure Backup to protect VM disks.
- Diagnostics: enable boot diagnostics and guest-level monitoring to collect logs and metrics.

- Extensions: add post-deployment extensions such as the custom script extension or monitoring agents.
- Tags: apply tags (key:value) to organize resources for billing and automation.
--generate-ssh-keys) for production. The following shows a password example (not recommended for production):
- Linux: connect with SSH (e.g.,
ssh adminuser@<public-ip>), using the private key if you created one. - Windows: use RDP or Azure Bastion for secure access without exposing RDP to the internet.
- Perform initial configuration: install updates and required packages.
- Harden the VM: configure OS-level firewalls, system updates, and user access controls.
- Configure monitoring and backups: enable Azure Monitor alerts and Azure Backup for data protection.
- Azure Virtual Machines documentation
- Azure CLI documentation
- Az PowerShell module
- Azure Marketplace images