Search code examples
powershellazureiaaspatch

How to Autopatch Azure IaaS VMs


We have a public website hosted on two Azure IaaS VMs which are behind a Network Load Balancer. What are the available solutions to auto patch and reboot without impacting site availability?

I am looking for a solution like this

  1. Suppress the IaaS VM in NLB to stop the traffic coming to the VM. (apply a network security group to stop the traffic)

  2. Run the monthly patches/updates on the IaaS VM

  3. Restart the IaaS VM
  4. Enable the IaaS VM in NLB to allow the traffic.
  5. Move on to next server

Are there any solution available for this in Azure? or do we need to prepare our own PowerShell scripts to do this? if its a PowerShell script how to make it run monthly once?


Solution

  • Are there any solution available for this in Azure?

    I suggest you could use Update Management solution in the Operations Management Suite, you can now configure an automated patching schedule for your Azure IaaS VMs.

    There you can define a one time, a weekly or monthly schedule. The possibility adding different VMs to different schedules ensures that your services running on Azure IaaS VMs will be always available during an automated patching schedule.

    More information please refer to this link.