How to automatically update a Windows VM on Azure 116 Reputation points

I have a windows vm in azure that i very rarely use. (Once a month, sometimes even less.). The machines is turned off between usage sessions.

Every time i do try to use it, i must install quite a lot of updates first, which is a bit annoying. Can i do something, so it starts once a week (every sunday?), checks for and installs all available updates and goes back to sleep afterwards?

-thomas woelfer

A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.
3,029 questions
Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
5,918 questions
0 comments No comments
{count} votes

Accepted answer
  1. AirGordon 5,665 Reputation points

    My approach to this problem is to employ precisely the solution you have suggested about automatically turning the VM on.

    Firstly, I tend to use the daily Auto Shutdown as a fall back in case i forget to turn the VM off when I am using it. (Say at 7pm).

    Secondly, I configure scheduled updates on the VM which occur at 5pm on a Sunday (actually i tended to choose Friday, but pick whatever day works best for you. I just prefer to pick a day when the VM would usually be on, to avoid starting it purely for patching).

    Lastly, I leverage automation to start the VM up - just in case I hadn't been using the VM that day.

0 additional answers

Sort by: Most helpful