How to automatically update a Windows VM on Azure

twoelfer@hotmail.com 136 Reputation points
2023-09-13T07:14:25.36+00:00

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?

WM_THX
-thomas woelfer

Windows
Windows
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.
5,290 questions
Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,773 questions
0 comments No comments
{count} votes

Accepted answer
  1. AirGordon 7,120 Reputation points
    2023-09-13T07:46:41.8466667+00:00

    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

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.