Azure Virtual Desktop for Occasional Use
Cost-effective Azure Virtual Desktop infrastructure for occasional work sessions. Deploy in minutes, deallocate to save 98% on costs, resume whenever needed.
⚡ Why This Project?
- Personal desktop – Purpose-built for individual occasional use.
- Cost optimised – £2–3/month idle, £94–126/month active (98% savings when deallocated).
- Infrastructure as Code – Reproducible, version-controlled Bicep templates.
- Easy lifecycle – Deploy once, deallocate/start as needed.
- Cloud-native – Entra ID-joined VMs, no on-premises AD required.
🚀 Quick Start (5 minutes)
# 1. Clone and authenticate
git clone https://github.com/markheydon/avd-occasional.git
cd avd-occasional
az login
# 2. Deploy infrastructure (15–20 minutes)
.\scripts\Deploy-AvdOccasional.ps1
# 3. Assign role permissions (both required)
# See Quick Start Guide for detailed role assignment commands
# 4. Connect
# Use Windows App (Microsoft Store) to connect to your desktop
# Later: Save costs
.\scripts\Stop-AvdOccasional.ps1
# Resume when needed
.\scripts\Start-AvdOccasional.ps1
Full instructions: Quick Start Guide
📚 Documentation
| Document | Purpose |
|---|---|
| Quick Start | Get up and running in ~25 minutes (includes 5–10 min role propagation). |
| Prerequisites | Tools, Azure setup, role assignments, and security requirements. |
| Architecture Overview | How components work together, cost drivers, security model. |
| Detailed Deployment | Step-by-step walkthrough, customisation, and advanced options. |
| Troubleshooting | Common issues and solutions. |
| Scripts Reference | PowerShell commands: Deploy, Start, Stop, Remove. |
💰 Cost Profile
⚠️ Important: Costs are estimates, in GBP, based on pricing information available publically in February 2026 and are subject to change by Microsoft at any time. You should use the official Azure Pricing Calculator to determine your potential costs before deployment.
| State | Monthly Cost | Notes |
|---|---|---|
| Deallocated | £2–3 | VMs stopped, disks retained (instant resume) |
| Running | £94–126 | Full D2s_v3 compute (1 VM, moderate workload) |
| Deleted | £0 | Complete removal (15–20 min redeploy) |
| Savings | ~98% | Cost reduction when deallocated vs running |
Component breakdown:
- Session Host VM: £90–120/month (active) → £0 (deallocated).
- Public IP: £2–3/month (active) → £0 (deallocated & deleted).
- OS Disk: £2–3/month (always charged).
See Detailed Deployment: Cost Analysis for scaling costs and optimisation strategies.
🏗️ Architecture at a Glance
┌─────────────────────────────────────────┐
│ Internet User │
│ (Windows App or RDP Client) │
└──────────────────┬──────────────────────┘
│
▼ Secure reverse connection
┌──────────────────────────────┐
│ Azure Virtual Desktop Service │
└──────────────────┬────────────┘
│
▼ Isolated virtual network
┌─────────────────────────────────────┐
│ VNet: 10.0.0.0/16 │
│ ├─ Session Host VM (Entra ID-joined)│
│ ├─ Public IP (outbound only) │
│ ├─ NSG (inbound deny) │
│ └─ Service Endpoints (free routes) │
└─────────────────────────────────────┘
Key features:
- Entra ID-joined VMs (cloud-native, no VPN required).
- No inbound public ports (reverse connection only).
- Public IPs deleted when VMs stopped (cost optimisation).
- Service Endpoints for optimised Azure service routing.
- Fully idempotent deployment.
See Architecture Overview for detailed component descriptions.
🎯 Use Cases
✅ Remote work from alternate location – Coffee shop, co-working, travel. ✅ Temporary compute needs – Project work, testing, demos. ✅ Cost-sensitive scenarios – Deallocate between sessions. ✅ Personal productivity – Persistent desktop, cloud-native identity.
❌ Not for: Pooled multi-user scenarios. ❌ Not for: Always-on production workloads.
🔧 Key Features
- ✅ Bicep Infrastructure as Code – Reproducible, auditable, version-controlled.
- ✅ Parameterised configuration – Switch workload size (light/moderate) in one parameter.
- ✅ Personal desktop – Single user, persistent configuration.
- ✅ Entra ID authentication – Cloud-native identity, supports passwordless auth.
- ✅ Deallocate pattern – Stop VMs to save costs, resume in 2–3 minutes.
- ✅ Automated lifecycle scripts – Deploy, start, deallocate, cleanup.
- ✅ Minimal security – Reverse connections, NSG included, no RDP ports.
- ✅ UK-friendly defaults – Region:
ukwest, pricing in GBP (Regionalising of VMs not yet available see #2).
📋 Prerequisites at a Glance
| Requirement | Status | Details |
|---|---|---|
| Azure CLI | Required | v2.40+ (Install) |
| Bicep CLI | Required | Included with Azure CLI 2.20+ |
| PowerShell | Required | 5.1+ (Install) |
| Git | Required | Clone repository (Download) |
| Azure subscription | Required | Contributor or Owner role |
| Entra ID tenant | Required | Usually available with Microsoft 365 |
For full prerequisite details, see Prerequisites Guide.
📘 Documentation & Resources
Getting Started
- New to this project? Start with Quick Start.
- Need environment setup? See Prerequisites.
- Want to understand how it works? Read Architecture Overview.
- Detailed walkthrough? Follow Detailed Deployment Guide.
- Troubleshooting? Check Troubleshooting Guide.
- Using PowerShell scripts? See Scripts Reference.
External Resources
- Azure Virtual Desktop Documentation
- Azure Virtual Desktop Learn Path
- Bicep Documentation
- Azure CLI Reference
- Azure Pricing Calculator
Project Documentation
- CONTRIBUTING – Contribution guidelines
- CHANGELOG – Version history and release notes
- LICENSE – MIT License
- README – Project overview
GitHub
- Repository – Source code and issue tracking
- Issues – Report bugs or request features
- Discussions – Questions and ideas
Last Updated: February 2026