Skip to content

Instantly share code, notes, and snippets.

@jimmyli97
Last active June 14, 2026 22:37
Show Gist options
  • Select an option

  • Save jimmyli97/569c17abf64603d55df00f84994df3cd to your computer and use it in GitHub Desktop.

Select an option

Save jimmyli97/569c17abf64603d55df00f84994df3cd to your computer and use it in GitHub Desktop.
How to create a personal VM for your own use on Azure Virtual Desktop
This guide is if you just want to spin up a machine on Azure Virtual Desktop running Windows with Microsoft Office or Linux with a certain number of CPU cores/RAM size, without having to mess around with learning a command line, host pools, etc.
If you want to learn more in depth for multiple users or want to use FSLogix, I would recommend some other guides like:
* https://www.reddit.com/r/AZURE/comments/scatdz/here_is_a_stepbystep_guide_to_setup_azure_virtual/
* https://www.youtube.com/watch?v=ElPThSGV2Cs
--- Find Available VM Sizes
1. Create a Microsoft Azure account, link your credit card
* https://azure.microsoft.com/en-us/pricing/purchase-options/azure-account
* https://learn.microsoft.com/en-us/azure/cost-management-billing/manage/change-credit-card
2. Find your region's programmatic name
* https://learn.microsoft.com/en-us/azure/reliability/regions-list?tabs=all
2. Visit shell.azure.com, create an ephemeral shell
3. Type in `az vm list-sizes --location "[YOUR REGION HERE]" | less`
* If they ever deprecate `list-sizes` you can use `list-skus` instead but it takes much longer, about 2 min
4. While that's running, in a separate tab, search for machines in your region that fit your needs and see pricing:
* https://azure.microsoft.com/en-us/pricing/details/virtual-machines/windows/#pricing
* The cheapest machines I've found are the D* series (e.g. Daldsv7-series).
* Core numbers come after the series letter, so D4 is a 4-core machine.
5. Find the programmatic name of your desired machine by replacing spaces in the instance name with an underscore (e.g. "D4als v7" becomes "D4als_v7")
6. Back to shell.azure.com, search in less by typing "/[search pattern]" for your desired machine, e.g. "/
* less search is case sensitive
* press `f` and `b` to navigate pages, press `n` and `N` to navigate search results
* if your machine doesn't show up then it means it's not available, you have to pick a different one
7. Write down the full name of your machine, it should start with `Standard` e.g. `Standard_D4lds_v7`
8. You might also want to choose a storage, but `Standard_LRS` is fine for virtual personal desktops
* https://azure.microsoft.com/en-us/pricing/details/storage/blobs/
--- Get A Virtual Machine Template
1. To get a bunch of default settings, we're going to use the Quickstart template. In portal.azure.com search for `Azure Virtual Desktop`. Click on `Quickstart`, then `Azure Virtual Desktop`, then `Create`
2. Select your region, type in your user/password, etc. Assign yourself as the user.
3. Hit Next - Review & Create (NOT Review & Create), then click `Download a template for automation`
4. Extract the downloaded zip file on your computer.
--- Deploy Template
1. In Azure search for `deploy a custom template`
2. Click `build your own template`
3. Click `load file`, upload `template.json` that you downloaded.
4. Edit parameters to your liking
4a. Ctrl+F `virtualMachineSize`, replace the default value with your chosen machine programmatic name
4b. Ctrl+F `storageAccountType`, replace the default value with your chosen storage type (`Standard_LRS` is the cheapest and all you really need for a personal computer)
5. Save
6. Click `edit parameters`, upload parameters.json
• Security principal object id is same as Azure Active Directory / Entra ID > User > Your user's object ID
7. Click Review + Create. should take about 25 min for deployment to complete.
~25 min for deployment
--- Connect using native RDP
2. Go to Virtual Desktop > Workspaces > Resource Group > Virtual Machine > Network Settings > Configure Public IP
3. Click the default primary IP, check Associate public IP Address, and create a new IP address and save
4. back to Network Settings > Create Inbound Port Rule > RDP, 3389 destination port
5. back to Virtual Machine, go to Connect, Download RDP file
6. Open the RDP file in your RDP client and you are all set! Would recommend windowed RDP client, fullscreen sometimes the clickable area is off for some reason
--- Monitor Costs
* In Azure search Cost Management > Cost Analysis > CostByService
* Only long term cost in shutdown state is Storage (so about $6/mo. for standard HDD LRS storage)
--- Cleanup
* In Azure search Resource Manager > See All Resources. Display count 200. Check all, delete. Wait for some to fail (network security groups usually fail). Check all, delete again
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment