Auto Shutdown and Auto Start an Azure VM 🛑

Поделиться
HTML-код
  • Опубликовано: 1 фев 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!

    • @Thomas_Maurer
      @Thomas_Maurer  3 года назад

      nice, let me know how it is going :)

  • @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?

    • @Thomas_Maurer
      @Thomas_Maurer  2 года назад

      Use an Azure Logic App for example :)

  • @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