SOLVED

Azure Dev Test Lab subscription for Auto shutdown VMs

%3CLINGO-SUB%20id%3D%22lingo-sub-2026634%22%20slang%3D%22en-US%22%3EAzure%20Dev%20Test%20Lab%20subscription%20for%20Auto%20shutdown%20VMs%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2026634%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20All%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20would%20like%20to%20know%20why%20Azure%20Dev%20Test%20lab%20subscription%20is%20required%20to%20enable%20auto%20shutdown%20feature%20for%20Azure%20VMs%20%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2026634%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAutomation%20%26amp%3B%20Control%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EAzure%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EDevOps%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ENetworking%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EPatch%20%26amp%3B%20Change%20Management%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2027779%22%20slang%3D%22fr-FR%22%3ERe%3A%20Azure%20Dev%20Test%20Lab%20subscription%20for%20Auto%20shutdown%20VMs%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2027779%22%20slang%3D%22fr-FR%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F668973%22%20target%3D%22_blank%22%3E%40Sagar_Lad%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHi%20you%20don't%20need%20Azure%20Dev%20Test%20Lab%20to%20do%20so%3C%2FP%3E%3CP%3EYou%20can%20how%20much%20resource%20tag%20and%20Azure%20automation%20to%20start%20and%20stop%20virtual%20machine%20on%20schedule.%3C%2FP%3E%3CP%3EIt%20is%20documented%20here%3A%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fautomation%2Fautomation-solution-vm-management%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fautomation%2Fautomation-solution-vm-management%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2028494%22%20slang%3D%22en-US%22%3ERe%3A%20Azure%20Dev%20Test%20Lab%20subscription%20for%20Auto%20shutdown%20VMs%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2028494%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F668973%22%20target%3D%22_blank%22%3E%40Sagar_Lad%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20is%20not%20entirely%20correct.%20You%20don't%20need%20to%20create%20a%20DevTest%20lab%20resource%20to%20enable%20auto-shutdown%20for%20Azure%20VMs%2C%20but%20you%20need%20to%20provision%20a%20'microsoft.devtestlab%2Fschedules'%20resource%20that%20will%20enable%20this%20functionality.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAs%20you%20can%20see%2C%20the%20schedule%20is%20coming%20from%20devtestlabs%20RP%2C%20so%20the%20only%20%22dependency%22%20is%20that%20this%20RP%20must%20be%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fazure-resource-manager%2Fmanagement%2Fresource-providers-and-types%23register-resource-provider%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3Eregistered%3C%2FA%3E%20in%20your%20subscription%20and%20this%20service%20must%20be%20%3CA%20href%3D%22https%3A%2F%2Fazure.microsoft.com%2Fen-us%2Fglobal-infrastructure%2Fservices%2F%3Fproducts%3Ddevtest-lab%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3Eavailable%20in%20the%20region%3C%2FA%3E%2C%20where%20you%20deploy%20your%20VMs%20in%20Azure.%20You%20can%20then%20for%20instance%20extend%20your%20ARM%20template%2C%20like%20it%20is%20described%20in%20many%20places%2C%20for%20example%20%3CA%20href%3D%22https%3A%2F%2Fwww.danielstechblog.io%2Fintegrate-auto-shutdown-configuration-arm-template-deployments-azure-vms%2F%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehere%3C%2FA%3E.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2033610%22%20slang%3D%22en-US%22%3ERe%3A%20Azure%20Dev%20Test%20Lab%20subscription%20for%20Auto%20shutdown%20VMs%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2033610%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F668973%22%20target%3D%22_blank%22%3E%40Sagar_Lad%3C%2FA%3E%26nbsp%3B%20This%20is%20not%20applicable%20for%26nbsp%3BDev%20Test%20Lab%20subscription%2C%20you%20can%20setup%20an%20automation%20Auto%20stop%2FStart%20policy%20for%20any%20subscription%20to%20save%20computing%20cost.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Contributor

Hi All,

 

I would like to know why Azure Dev Test lab subscription is required to enable auto shutdown feature for Azure VMs ?

3 Replies

@Sagar_Lad 

 

Hi what is the reference for this  ? 

Because in a regular subscription ( Not only Azure Dev Test Lab ) you have the feature  on the blade of each virtual machine . Also you can leverage Azure Resource Tags, Azure log Analytics and Azure Automation  to start and stop VM on schedule if autoshutdown is not suitable for your need .

More information here : Azure Policy - Auto shutdown your virtual machines - DEV Community

https://docs.microsoft.com/en-us/azure/automation/automation-solution-vm-management

Best Response confirmed by Sagar_Lad (Contributor)
Solution

Hi @Sagar_Lad ,

 

This is not entirely correct. You don't need to create a DevTest lab resource to enable auto-shutdown for Azure VMs, but you need to provision a 'microsoft.devtestlab/schedules' resource that will enable this functionality.

 

As you can see, the schedule is coming from devtestlabs RP, so the only "dependency" is that this RP must be registered in your subscription and this service must be available in the region, where you deploy your VMs in Azure. You can then for instance extend your ARM template, like it is described in many places, for example here.

 

@Sagar_Lad  This is not applicable for Dev Test Lab subscription, you can setup an automation Auto stop/Start policy for any subscription to save computing cost.