{"id":23337436,"url":"https://github.com/smalls1652/smallsonline.avd.resourcemanager","last_synced_at":"2026-04-24T11:35:26.313Z","repository":{"id":37866365,"uuid":"456034214","full_name":"Smalls1652/SmallsOnline.AVD.ResourceManager","owner":"Smalls1652","description":"Shutdown unused Azure Virtual Desktop session hosts automagically.","archived":false,"fork":false,"pushed_at":"2023-10-02T08:27:40.000Z","size":306,"stargazers_count":1,"open_issues_count":16,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-24T07:11:59.707Z","etag":null,"topics":["azure","azure-functions","azure-virtual-desktop","csharp"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Smalls1652.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-02-06T02:07:05.000Z","updated_at":"2023-07-18T09:10:05.000Z","dependencies_parsed_at":"2025-02-13T15:51:42.973Z","dependency_job_id":"4af64c22-9133-47a2-82ab-b03e55e5d022","html_url":"https://github.com/Smalls1652/SmallsOnline.AVD.ResourceManager","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/Smalls1652/SmallsOnline.AVD.ResourceManager","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Smalls1652%2FSmallsOnline.AVD.ResourceManager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Smalls1652%2FSmallsOnline.AVD.ResourceManager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Smalls1652%2FSmallsOnline.AVD.ResourceManager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Smalls1652%2FSmallsOnline.AVD.ResourceManager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Smalls1652","download_url":"https://codeload.github.com/Smalls1652/SmallsOnline.AVD.ResourceManager/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Smalls1652%2FSmallsOnline.AVD.ResourceManager/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261823770,"owners_count":23215145,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["azure","azure-functions","azure-virtual-desktop","csharp"],"created_at":"2024-12-21T02:17:24.929Z","updated_at":"2026-04-24T11:35:21.288Z","avatar_url":"https://github.com/Smalls1652.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Azure Virtual Desktop Resource Manager\n\nShutdown/deallocate Azure Virtual Desktop session hosts, when they're no longer being actively used, to save money on Azure costs.\n\n## Current build status\n\n[![Build](https://github.com/Smalls1652/SmallsOnline.AVD.ResourceManager/actions/workflows/build.yml/badge.svg?event=push\u0026branch=main)](https://github.com/Smalls1652/SmallsOnline.AVD.ResourceManager/actions/workflows/build.yml)\n\n## Projects\n\n- [Updates planned for upcoming releases](https://github.com/users/Smalls1652/projects/2)\n- [All projects for repo](https://github.com/Smalls1652/SmallsOnline.AVD.ResourceManager/projects?type=beta)\n\n## 🤔 The motive\n\nWith Azure Virtual Desktop, you can create hostpools that are either multi-session capable, which allows multiple users to connect to a single VM at one time that's load-balanced across a pool of VMs, or are \"personally assigned\" to an individual user, which allows a single user to have a VM assigned to them and no other user. A lot of times, the multi-session hostpools are the goto for standing up remote desktops; however, there are times when personally assigned VMs need to be used.\n\nThere's a huge catch to running personally assigned VMs though: **Those VMs will incur costs if they're not deallocated**. Microsoft has had the [\"Start VM on connect\"](https://techcommunity.microsoft.com/t5/azure-virtual-desktop-blog/start-vm-on-connect-enters-ga/ba-p/2595282) feature, which has been generally available since July 2021, as an option for _starting_ the VM when it's in a deallocated state, but how do you deallocate the VM without interrupting the user experience?\n\nWith this solution, you can have those VMs deallocate when they are not in active use to save money. This will also incur costs, but, in my current usage, it's only costing less than $2/month (USD) to run; however, your mileage may vary, but it will pale in comparison to the costs of running a VM for 24 hours per day.\n\n## 🪄 How it works\n\nEvery 20 minutes it triggers an evaluation on each hostpool, that you configure it to check, and each VM in that hostpool. If a VM hasn't had an active session twice (Equal to 40 minutes of no sessions), it will deallocate the VM. In the future this will be configurable to be higher.\n\nOn the backend, it's using these following Azure services:\n\n* **Azure Functions**\n  * For running the evaluation checks.\n* **Azure CosmosDB**\n  * For storing data about the hostpools and their VMs.\n* **Azure User-assigned Managed Identity**\n  * For authenticating with the Azure resources.\n\n## 🏗️ Setting up\n\nFor info on how to deploy this into your own Azure subscription, [check out the docs in the wiki](https://github.com/Smalls1652/SmallsOnline.AVD.ResourceManager/wiki)!\n\n## 🧑‍💻 Building from source\n\nYou will need the following tools to build from source:\n\n* [.NET 6.0 SDK](https://dotnet.microsoft.com/en-us/download/dotnet/6.0)\n* [Azure Functions Core Tools](https://docs.microsoft.com/en-us/azure/azure-functions/functions-run-local)\n\n## 🤝 License\n\nThis project is licensed under the [MIT License](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmalls1652%2Fsmallsonline.avd.resourcemanager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmalls1652%2Fsmallsonline.avd.resourcemanager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmalls1652%2Fsmallsonline.avd.resourcemanager/lists"}