Auto Shutdown and Auto Start an Azure VM 🛑

Поділитися
Вставка
  • Опубліковано 31 січ 2025

КОМЕНТАРІ • 109

  • @e815usa
    @e815usa Рік тому +2

    Thomas, thank you SO much for this tutorial! I have been looking uip and down for a simple way to stop and restart Azure VM's on a schedule, and this was it!
    Much respect to you, from a former Microsoft employee!

  • @aadiprem
    @aadiprem 3 роки тому +3

    Of all the documents and videos, your video explains the topic the best. Great Work. Keep it up!

  • @richardwaldron1684
    @richardwaldron1684 3 роки тому +2

    Many thanks for posting this Thomas. This was just what I was looking for, I had some test VMs that I didn't enable the auto shutdown feature during their creation because I needed them to start running for others to use before i started work, so I just left them on which obviously got expensive very quickly. This will save me a lot of money and effort - cheers!

  • @sandsandeeps
    @sandsandeeps Рік тому +1

    Incredible video-profoundly insightful! Much gratitude for sharing such valuable content!

  • @derrickbradley761
    @derrickbradley761 3 роки тому +11

    What would it look like to schedule the autostart for M-F of every week?

  • @saul_anaya
    @saul_anaya 2 роки тому +2

    Thank you very much for the explanation, very detailed and "straight to the point"

  • @chocolatesoflife4686
    @chocolatesoflife4686 3 роки тому +1

    Good one - just applied & waiting to see

    • @chocolatesoflife4686
      @chocolatesoflife4686 3 роки тому

      And it works just like a champ ! Could you post something on the Azure Automation Account same way which can target multiple VMs in single shot ?

  • @Cmart6444
    @Cmart6444 Рік тому +1

    Thanks indeed Thomas, quite amusing and instructive your video, I really, really liked it! I am going to use it and come back to let you know how it worked for me. Regards!

  • @andreaskarz
    @andreaskarz 3 роки тому +1

    Wow, genius -- I will test this for my E2E-Test VM's -- thank you for this great tipp 🤙

  • @bruce88wayne
    @bruce88wayne 3 роки тому +7

    Man this was so much easier than scripting in the automation account.

    • @Thomas_Maurer
      @Thomas_Maurer  2 роки тому

      yes it is :)

    • @mikeyromero93
      @mikeyromero93 2 роки тому

      ​@@Thomas_Maurer any pros & cons on using tasks vs. scripting the automation accounts?

    • @FlyingFamily
      @FlyingFamily 2 роки тому

      yes, 3years back i created a automation account then run the shutdown and start script through runbook

  • @tonys9180
    @tonys9180 3 роки тому +1

    Currently doing this using Powershell scripts that are run via schedule in automation accounts with SPN accounts for the run-as. Will give this method a try. Thank you!

  • @touchinline0565
    @touchinline0565 2 роки тому +1

    Thank you very much. Very well explained, clear and helpful.

  • @Cmart6444
    @Cmart6444 Рік тому +1

    Hey Thomas, thanks indeeeeeeddddd!!!! It worked out quite fine!!!!!!!!!!!! Thanks indeed!

  • @shantanumahajan5390
    @shantanumahajan5390 3 роки тому +5

    Hey Thomas very nice. Need one help. I need to start/stop vm only on weekdays.how can I do it I mean from Monday to Friday every week. How can I adjust the time interval and frequency?

    • @Brabrablabra
      @Brabrablabra 2 роки тому +1

      Got the same question - can you tell me how you did it?

    • @RabbitJnr
      @RabbitJnr 2 роки тому +1

      Have the same question as well.

  • @prashanthkommana8648
    @prashanthkommana8648 3 роки тому +1

    FANTATSTICOOOOOOO... LOVELY VIDEO

  • @jaimegbertozi
    @jaimegbertozi 3 роки тому +3

    How could I use it to shutdown every weekdays, but on friday turn off and only turn on on monday, to keep turned it off on weekend? I didn't see any option to select the days I want to execute.

  • @ShoaibEjaz
    @ShoaibEjaz 3 роки тому

    This will not deallocate the VM, just shut it down. Hence the cost will still be running. To deallocate, use the the same method to make the task, but edit the task in the Logic Apps. Add step after shutdown by clicking on the "+" sign --> Choose add action --> in searchbox write: deallocate. Under result for "Action" you will find "Deallocate virtual machine". Choose this and configure with the correct values with the drop down list. Beside this, its a great video Thomas.

    • @kuldeep7063
      @kuldeep7063 2 роки тому

      so how we can stop money meter or you can say deallocate the VM

    • @ShoaibEjaz
      @ShoaibEjaz 2 роки тому

      @@kuldeep7063 Hi, I have written the answer in my post. Did you try it?

  • @anugrahmuzakkipuar5020
    @anugrahmuzakkipuar5020 3 роки тому

    Thanks a lot for this video. This is the easiest way to do it!

  • @curepc5748
    @curepc5748 3 роки тому +1

    Nice one Thomas, thanks for the tip.

  • @pruthvishree5131
    @pruthvishree5131 3 роки тому

    thank you very much ..that was so simple and on-point info shared !!

  • @MuttGutley
    @MuttGutley 3 роки тому +2

    Thanks for the video. Much easier than how I was trying to run this task. Question - I am in Denver, selected Mountain Standard Time, but it seems to be off by an hour. I adjusted the time by an hour, but the tasks still ran an hour later than scheduled. IE - Task /VM off at 11pm VM on at 6am - Task ran at 12am and 7am. Tried different time zone with same results. Thx,

  • @alexmelillo1247
    @alexmelillo1247 3 роки тому +1

    Very nice. This would seem obvious to some, but just a friendly reminder to NEVER use a user's account to keep automation tasks running. Users come and go, but the business continues :p always make a generic or service account

  • @aanupajx
    @aanupajx 3 роки тому +1

    this is very simple than using run books if we do not have any sequential start.

  • @ramvlogs6809
    @ramvlogs6809 3 роки тому +1

    Thanks man.. This is easy and Fun......!!!

  • @vatsalbalde
    @vatsalbalde 2 роки тому +2

    This is a great video
    What if i want the VM's to be turned on only on week days (Mon-Fri) and not on weekends (Sat-Sun). The same should repeat every week.
    How can this be done?

    • @FlyingFamily
      @FlyingFamily 2 роки тому

      possible to script by creating automation account

  • @aghanawazan
    @aghanawazan Рік тому +1

    Thanks, it will be charged with stopped status so how to deallocate VM?
    If the status says “Stopped (Deallocated),” you're not being billed. If it says, “Stopped Allocated,” you're still being billed for allocated virtual cores (not the software license itself).

  • @dansmith5381
    @dansmith5381 3 роки тому +1

    Great Video, thank you, it was very helpful

  • @aghanawazan
    @aghanawazan Рік тому +1

    We need to use Auto shutdown option to shutdown VM with deallocation status and need to use add task option to start VM from Stopped deallocated status to running. it worked with me.

  • @cellentmaya1533
    @cellentmaya1533 2 роки тому

    Thanks for the video. How much does it cost per VM to set auto start and auto shutdown per month? How to calculate?

  • @purnachandrak2148
    @purnachandrak2148 3 роки тому +1

    Great content 👍

  • @TheVicMan65
    @TheVicMan65 3 роки тому +1

    Hi there, great video. The company I work for manages over 300 Azure VMs, we need to auto shut them down and start them at specific schedules for different countries, we also need to re-establish any applications that are not running after starting them. We are exploring ways to do this. How can I automate this process? Thanks a lot.

    • @Thomas_Maurer
      @Thomas_Maurer  3 роки тому

      Azure Logic Apps is a great way of doing this

  • @HeyLuke
    @HeyLuke 2 роки тому

    This video has been super helpful, but it leaves me with a question. Azure not only creates a logic app but also two resources called 'API Connections' in the resource group. Can you elaborate on what those are used for?

  • @ithelps
    @ithelps 3 роки тому

    Thank you for that, a really simple and strait forward video.
    I'm still struggling to add a webhook to the logic app that so users can start stop the machine using a weblink.

  • @igorvalsecchi
    @igorvalsecchi 3 роки тому

    Excellent video!! But I have a question.... after run, the status became "STOPPED" instead of "Stopped (deallocated)
    " .... Does "STOPPED" stop charges? or only "Stopped (deallocated)
    " would stop charges?

    • @fabriciomattos16
      @fabriciomattos16 2 роки тому +1

      What I did was to create a second task with 10 minutes of difference to Power Off and Deallocate the VM. I worked pretty well

  • @Valdore1000
    @Valdore1000 Рік тому +1

    Would it be possible to build an Azure pipeline which would automatically wake up target SHIR and then let it run for 4 hours?

  • @cloudtech273
    @cloudtech273 3 роки тому +1

    This is great. How does this extend to the enterprise ? Our setup is large with 100’s of servers in dev. How do I write a schedule for all of them ?

    • @Thomas_Maurer
      @Thomas_Maurer  3 роки тому +1

      Yes you can also go and create an Azure Logic App for multiple machines. You could group them usimg tags.

  • @richardlanglois5183
    @richardlanglois5183 3 роки тому +1

    Great tip!

  • @chaitanyakumar5343
    @chaitanyakumar5343 3 роки тому

    Super work, Can i know what is interval while creating task please help me

  • @kc2213
    @kc2213 2 роки тому

    I get "No task templates found in this region, please try a using a resource located in a different ergion where logic app is available" when I click on add a task. I've already deployed logic apps too

  • @edwinrombouts3984
    @edwinrombouts3984 2 роки тому

    Great video. Is there also a way to automatically deallocate a VM if the user (of the virutal desktop) shuts it down through the OS?

  • @dbardele
    @dbardele 3 роки тому

    Is there a way to sign in to the VM once it's started? I'm able to turn it on, but I have tasks (specifically, a Power BI data refresh using a Personal Gateway) that only run when I'm logged in. Can I do this somehow in Logic App Designer? Thanks for this video...very helpful to get me started.

  • @skyblacklp
    @skyblacklp 3 роки тому +1

    Thanks Thomas great video, can you create a video about of runbooks, i'm new in azure your videos and it's very useful.

    • @Thomas_Maurer
      @Thomas_Maurer  3 роки тому +1

      thank you. Yes, I will do one in the coming weeks. Will take a moment, since I have a couple of others in the pipeline. But I have added your idea to the list! Thank you :)

  • @nida.arshad151
    @nida.arshad151 2 роки тому

    I have a doubt here.. how do I prevent the pubic IP’s of the VMs from changing whenever there is a start after a shutdown as changing IP address will create a block in the flow

  • @dal6876
    @dal6876 2 роки тому +1

    question, can you have the VM's shut down on weekends only?

    • @Thomas_Maurer
      @Thomas_Maurer  2 роки тому

      you are free to configure the shutdown when ever you need it.

  • @MrJcontrer
    @MrJcontrer Рік тому

    Is there a way to schedule Mon-Friday ? i dont see that option ....

  • @livestronger1981
    @livestronger1981 6 місяців тому

    Does Auto shut down hurt the OS? like pulling the power cord without shutting it down from inside the OS?

  • @emmanuelndive4422
    @emmanuelndive4422 2 роки тому

    How do I schedule the vm to start Monday to Friday @9am - 5pm?

  • @ilangoswamy8456
    @ilangoswamy8456 2 роки тому +1

    Hi Thomas how can we do it for multiple VMs at the same time?

  • @wixy369
    @wixy369 3 роки тому

    It doesnt send me a notification email.
    It does the task but no email.
    "message": "REST API is not yet supported for this mailbox. This error can occur for sandbox (test) accounts or for accounts that are on a dedicated (on-premise) mail server.",
    what does this mean? im not an IT person

  • @nestorreveron
    @nestorreveron 3 роки тому +2

    Excellent

  • @schapman167
    @schapman167 3 роки тому

    HI Thomas, this is a great video, but doesnt this just simply stop the VM and not de-allocate it, thus it will still cost money?

    • @Thomas_Maurer
      @Thomas_Maurer  3 роки тому

      This will de-allocate the VM to save costs 😊

  • @robb1267
    @robb1267 3 роки тому

    Instead of having the task use my credentials, is there a way to have it use an automation Run As or other service account?

  • @antonykao139
    @antonykao139 2 роки тому

    Thanks for the video. I trigger the logic apps and get the error message
    {
    "code": "InvalidAuthenticationTokenTenant",
    "message": "The access token is from the wrong issuer
    }

    • @epic6696
      @epic6696 2 роки тому +1

      I am struggling with same error.. not sure where to start.

    • @omemester6985
      @omemester6985 2 роки тому +1

      Associate an identity to the logic app then update the logic app designer credentials to use the new identity.
      Fixed it this way but now I'm getting insufficient permissions error

  • @somboi-d4b
    @somboi-d4b Рік тому

    I want to shutdown azure devtest labs vms when idle, any idea how to go about this ??

  • @AkshayKumar-re3bf
    @AkshayKumar-re3bf 2 роки тому

    Hi Richard, can we do this automation task with the powershell script?

    • @Thomas_Maurer
      @Thomas_Maurer  2 роки тому

      who is Richard ;)
      You can also use a PowerShell script in combination with Azure Logic Apps

  • @UnimatrixYoutube
    @UnimatrixYoutube 3 роки тому

    How can i exclude the weekend? (saturday and sunday)

  • @m_kaizzz
    @m_kaizzz Рік тому

    will it charge user ? i want to set it up for one VM. will it charge ?

  • @ssmunola1
    @ssmunola1 2 роки тому

    Do you think we can schedule the task to run on every second Tuesday of each month?

  • @asriazmi
    @asriazmi 3 роки тому

    can it be done to azure virtual desktop host pool? Or can we apply it to multiple machines at once

  • @familytravel15
    @familytravel15 3 роки тому

    Any additional cost for auto shutdown and power ON the VM ?

  • @arunkumar-up3uo
    @arunkumar-up3uo 3 роки тому

    i want to schedule to power on from monday to saturday at 9am and it get shutdown at 9Pm and it should be in power off state only on monday and again it should start on monday at 9am?can we schedule like that?

  • @vinodboddu1991
    @vinodboddu1991 Рік тому

    can we implement tag based start and stop the vms using logic apps ?

  • @arunkumar-up3uo
    @arunkumar-up3uo 3 роки тому

    will this costs extra for connecting office 365?

  • @chanakakasun1989
    @chanakakasun1989 6 місяців тому

    when click Authentication create sign in not coming

    • @Thomas_Maurer
      @Thomas_Maurer  5 місяців тому

      is there a popup blocker active?

  • @fabriciomattos16
    @fabriciomattos16 2 роки тому

    Does anyone know if it costs to create and run these tasks???

  • @AbhishekSingh-le7tw
    @AbhishekSingh-le7tw 6 місяців тому

    There is a authorization issue here

  • @darshanmakim1408
    @darshanmakim1408 3 роки тому

    But in my vm schedule task not show pls help..

    • @vanillebear1
      @vanillebear1 3 роки тому

      same for me. only "send monthly cost" task is available... Working on an West Europe VM

  • @Twikkilol
    @Twikkilol 8 місяців тому

    As much as I think this is nice. I dont understand why Microsoft makes such a big issue about this.
    Isnt it just Schedule -> Powershell start Azure-VM. Easy done. Why do I need to talk to einstein, every time something very simple has to be done? :D

  • @neloyislam4002
    @neloyislam4002 2 роки тому

    How to manually shutdown?

  • @eduardovalle3751
    @eduardovalle3751 Рік тому

    it's free ??

  • @ArmandoHernandezR
    @ArmandoHernandezR Рік тому

    How do I schedule the vm to start Monday to Friday @8am - 8pm? Thanks