Skip to main content

Different cases of Azure VM 'reboots'

This post is focusing on different types of maintenance activities that can happen on your Azure Virtual Machine (VM). Depending on the actions that need to be done on your VM, this can have a direct or indirect impact on the machine availability or performance. 

Impact types
First of all, let's identify how a machine can be impacted by different maintenance activities. We do not include in this discussion cases like outages or disasters.
  • Performance decrease: During a live migration of a machine, the performance of the machine can be lower than usual. This happens because of the live migration of a machine from one physical hardware to another that consumes resources.
  • Pause: For a short period of time the machine is paused, but without data loss or connectivity problems (E.g., RDP connection is maintained, but delayed for a short period of time).
  • Unplanned reboot: There are isolated cases when the VM needs a restart. In this situation, there is a short period of downtime until the machine restarts.
  • Loss temporary drive: In specific situations, the temporary drive of the machine is lost. This shall not impact the applications that are running on the machine because the temporary drive should be used only for temporary data. 
  • Planned reboot: In this situation in the time window specified by the user when system redeploy is allowed, Azure initiates a system update that might request a system reboot. 

Impact situations
There are 3 types of cases when our machine availability is impacted.
  • Unplanned hardware maintenance: This is one of the most impressive scenarios. The platform can predict a hardware failure and trigger a migration from one physical hardware to another. This migration is done using live migrations technology that reduces the impact on the machine.
  • Unexpected downtime: It is represented by the cases when physical hardware fails (E.g., disk failure, network failure) and the only thing that is possible to do is to migrate the machine to another hardware on another rack or datacenter. In this situations, the machine is down for a specific time. Even if the temporary disk can be lost, the data and OS disk are preserved. 
  • Planned maintenance: Normal maintenance activities that are happening on Azure or machine level (E.g., OS update). In general, there is no impact on the machine availability, expect exceptional cases when a reboot is required. For this scenarios, Maintenance-Redeploy can be used to trigger the restart in a convenable time window. 


Mitigations procedures
There are some small things that we can do on our side to mitigate these situations and reduce at minimal the impact on our machines. 
  • Availability Sets: The first thing that we can do is to add multiple machines inside an availability set. This ensures us that in the case of a hardware failure the machines are stored on different physical resources, that are shared between them (fault domains). The same thing is applicable from how updates are pushed automatically to the VMs and how the reboot is happening (update domains). This combination of update and fault domains is called Available Set and is managed automatically by Azure. Using Availability Sets, Azure is offering a 99.95% uptime SLA.
  • Azure Load Balancer: It is not enough to have all the machines up and running. Besides this, you need a load balancer that can manage the load between machines and detect when a machine is rebooted. 
  • Azure Zones: Are entirely different from Availability Sets and ensures that machines are running in separate physical locations in the same Azure Regions. This means that each zone has its own storage, cooling system, network and power source. 
  • Manage Disk: This goes hand in hand with Availability Sets and ensures that the machine disks are isolated from each other. Behind the scene, each machine disk is added on different storage fault domains to ensure that in a case of a storage failure only a part of instances of that machine is affected.
  • Separate Availability Sets for each Application Tier: This simple solution ensures that it is impossible to have all machine restarts from the same application tier at the same time. If you use only one Availability Sets for all tiers, there is a small chance that all the machines from a specific tier to be restarted in the same time (odds are low, but still exists). 

Conclusion
As we can even if there are situations when we can have our machine down for a short period of times, there are simple things that we can do to avoid this kind of situations. Combining Availability Sets with Manage Disks and by keeping different application tiers on different Availablity Sets improves the odds to have our system offline. 

Comments

Popular posts from this blog

Windows Docker Containers can make WIN32 API calls, use COM and ASP.NET WebForms

After the last post , I received two interesting questions related to Docker and Windows. People were interested if we do Win32 API calls from a Docker container and if there is support for COM. WIN32 Support To test calls to WIN32 API, let’s try to populate SYSTEM_INFO class. [StructLayout(LayoutKind.Sequential)] public struct SYSTEM_INFO { public uint dwOemId; public uint dwPageSize; public uint lpMinimumApplicationAddress; public uint lpMaximumApplicationAddress; public uint dwActiveProcessorMask; public uint dwNumberOfProcessors; public uint dwProcessorType; public uint dwAllocationGranularity; public uint dwProcessorLevel; public uint dwProcessorRevision; } ... [DllImport("kernel32")] static extern void GetSystemInfo(ref SYSTEM_INFO pSI); ... SYSTEM_INFO pSI = new SYSTEM_INFO(

ADO.NET provider with invariant name 'System.Data.SqlClient' could not be loaded

Today blog post will be started with the following error when running DB tests on the CI machine: threw exception: System.InvalidOperationException: The Entity Framework provider type 'System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer' registered in the application config file for the ADO.NET provider with invariant name 'System.Data.SqlClient' could not be loaded. Make sure that the assembly-qualified name is used and that the assembly is available to the running application. See http://go.microsoft.com/fwlink/?LinkId=260882 for more information. at System.Data.Entity.Infrastructure.DependencyResolution.ProviderServicesFactory.GetInstance(String providerTypeName, String providerInvariantName) This error happened only on the Continuous Integration machine. On the devs machines, everything has fine. The classic problem – on my machine it’s working. The CI has the following configuration: TeamCity .NET 4.51 EF 6.0.2 VS2013 It see

Navigating Cloud Strategy after Azure Central US Region Outage

 Looking back, July 19, 2024, was challenging for customers using Microsoft Azure or Windows machines. Two major outages affected customers using CrowdStrike Falcon or Microsoft Azure computation resources in the Central US. These two outages affected many people and put many businesses on pause for a few hours or even days. The overlap of these two issues was a nightmare for travellers. In addition to blue screens in the airport terminals, they could not get additional information from the airport website, airline personnel, or the support line because they were affected by the outage in the Central US region or the CrowdStrike outage.   But what happened in reality? A faulty CrowdStrike update affected Windows computers globally, from airports and healthcare to small businesses, affecting over 8.5m computers. Even if the Falson Sensor software defect was identified and a fix deployed shortly after, the recovery took longer. In parallel with CrowdStrike, Microsoft provided a too