avd-opsDeploy quietly
Community research project. Use at your own risk. No warranty.Use at your own risk
  • Built on my own time for research and learning. Not affiliated with, endorsed by or supported by my employer or Microsoft.
  • Don't run any of it in production or against tenants that matter. Test in a dedicated lab subscription and tenant first.
  • Provided "as is", without warranty of any kind, under each repo's license. You use it at your own risk and own the Azure charges it incurs.
  • Contributions and forks are welcome and encouraged. See Contribute.

A small Linux VM as your shell

A VM keeps running whatever you start, for as long as it's on. Give it no public IP, reach it through free Bastion Developer, and let it shut itself down every night.

More

This is the third of the options, and the only one that bills Azure by the hour. Use it when you need to reach private endpoints or run something for hours. If you already run the landing zone, its opt-in jumpbox is this same pattern inside your landing zone's network (landing zone decision 0019).

What it costs

About $0.0094 an hour while it runs, plus about $2.40 a month for its disk, whether it runs or not.

More
  • Compute: Standard_B2ats_v2 Linux, $0.0094 an hour (East US 2 retail on 2026-11-23). Forty hours a month is about $0.38; left on all month it's about $6.86.
  • Disk: a 32 GiB Standard SSD (E4) is $2.40 a month. It bills while the VM is stopped, until you delete it.
  • Free account: B2ats v2 is one of the sizes free for 750 hours a month in the first 12 months of an Azure free account (free services).
  • Bastion Developer and no public IP: $0 (Bastion SKUs). A public IP would add a monthly charge and an open door.

1. Create the VM (about $0.0094 an hour while on)

Create it in the portal in a region that offers Bastion Developer, with no public IP and auto-shutdown on.

More

Follow Microsoft's Linux VM quickstart in a new resource group of its own, and change these settings:

  • Region: one that supports Bastion Developer.
  • Image and size: Ubuntu Server 24.04 LTS, Standard_B2ats_v2.
  • Sign-in: SSH public key.
  • Disks: Standard SSD.
  • Networking: public IP None, public inbound ports None.
  • Management: turn on Auto-shutdown at a time you're always done by, in your time zone.

2. Connect through Bastion Developer ($0)

In the portal, open the VM, select Connect, then Bastion. The connection opens in the browser over HTTPS.

More
  • Bastion Developer deploys itself the first time you connect and supports one connection at a time (Bastion quickstart).
  • It needs no public IP on the VM and no client software. We haven't tested it from an iPad yet.

3. Install the tools and sign in ($0)

Install PowerShell 7 and the Azure CLI, then sign in with a device code. Start long work inside tmux so you can come back to it.

More
  • Tools: PowerShell on Ubuntu and the Azure CLI on Linux. Git and tmux come with Ubuntu Server.
  • Sign in: az login --use-device-code, and Connect-AzAccount -UseDeviceAuthentication in PowerShell. Don't give the VM's managed identity any role unless something must run unattended.
  • Keep work running: start a session with tmux, run the step, and leave. After you reconnect, tmux attach brings it back, as long as the VM stayed on.
  • Patching is yours. Unlike Cloud Shell and Codespaces, nobody updates this machine for you.

4. Leave nothing billing

Auto-shutdown deallocates the VM every night. Stop it from the portal when you're done, and delete the resource group when you won't need it again.

More
  • Stop from Azure, not from inside the VM. A VM shut down from its own operating system shows "Stopped" and still bills compute; only "Stopped (deallocated)" doesn't (deallocate VMs).
  • Keep a budget on the subscription, as for any lab (working from Cloud Shell).
  • When you're finished, copy off anything you want to keep, then delete the resource group. That removes the disk, the last thing billing.
Linked from one page