Is shutting azure service

is shutting azure service

We could wrack our brains & comb through logs for days, without answering this question. Why? Because it’s the wrong question to ask.

A better question Instead, let’s rephrase the problem a little broader.“WHY is the VM shutting down at 10pm?”

Notice I didn’t say “why is the VM still shutting down at 10pm”. I want to set aside for a moment any past behavior versus expected new behavior and instead go exploring some of the reasons why a virtual machine would shut down.

Shut down causes/triggers Let’s brainstorm a few “usual suspects” that might shut down a VM:1. Azure Automation – yes, that’s what we were first looking at. Has it saved correctly? Are there any other runbooks executing first?2.


In the following figure, an app service plan with S1 pricing tier and 1 instance is billed by Microsoft, even though I don’t have an app deployed:

Likewise, even though the app service is stopped, Microsoft keep charging for the underlying app service plan.

You can optimize your app service plan cost by running multiple apps within a single app service plan. Please note that all the apps running under the same app service plan share the underlying resources among themselves. If one of the apps consume all the resources of the app service plan, it might result in failures in other apps.
Hence, if you have resource-intensive apps, its better to run them in their own app service plan.

To summarize, just shutting down or deleting the app service doesn’t stops Microsoft from charging.

I would suggest you start with these docs to get a better understanding of AKS and how it works for workloads

https://docs.microsoft.com/en-us/azure/aks/concepts-clusters-workloadshttps://docs.microsoft.com/en-us/azure/aks/best-practiceshttps://docs.microsoft.com/en-us/azure/aks/faq

Also, for persistent storage in AKS you can create persistent volumes that are attached to clusters so you don’t lose any data if you remove a cluster or change out nodes.

https://docs.microsoft.com/en-us/azure/aks/azure-disks-dynamic-pv

AKS works kind of like scalesets. You will have a number of nodes and each node will have containers running your application. If you need more nodes you can scale the cluster and the platform will automatically add the nodes and create the containers.

Same thing if you need to scale down.

Is shutting azure services

Azure virtual machine shut down, but the VM was not adhering to the shut down new time.. Learn how asking the wrong question can cause you to miss the answer!

Background – the change The systems administrator had an Azure Automation Runbook in place that told the Azure Windows Server virtual machine to shut down at 10pm each night. After changing the script to 11pm, the admin noticed that the server was still shutting down at 10pm.

So they started to investigate the wrong question …

“Why isn’t the VM acknowledging the changed time in the updated schedule?”

The importance of broader questions With this question, we’re assuming part of the cause – that the VM is controlled by the Azure Automation Runbook but somehow doesn’t realize there has been an updated change to the schedule.

For solutions which are already in production or pilot phases, the primary suggestion is to migrate to ConsenSys’ Quorum Blockchain offering on Azure since that is also a managed service. Alternatively, customers can opt to utilize blockchain resource management templates on their own infrastructure using Azure VMs. Of course, the disadvantage of this approach is that you’ll have to manage the solution yourself after deployment.

For new blockchain deployments and planning, Microsoft has recommended the Quorum and Besu templates available in the Azure Marketplace.
The company has also highlighted migration and data export steps and strategy in its guidance here.

Existing Azure Blockchain Service deployments will be supported up until September 10, 2021, which is why customers should start evaluating alternatives immediately.

Is shutting azure serviced

Azure Update Management, or even a third party management tool (though in none of those scenarios would I expect it to happen every day, but I have seen stranger things!).3. Azure Dev/Test Labs – These pre-configured Azure Resource Manager templates let you specify auto shutdown (and auto start) times and policies for your Azure VMs.4. Something else controlling that server – think of a local script, application or third party management tool.

Could the cause of the shut down be inside the VM itself and not related to Azure?

See if you can identify something I’ve left off this list, on purpose!

Analyzing the shut down event Now I have a few ideas outside the scope of just that one script, it’s time to go and look at the facts.

Starting with the Windows Server event log, it tells me that a shut down event was initiated at 2200hrs.

If corruption is reported run the following command until the disk is corruption free:dism /online /cleanup-image /restorehealth

If you are unable to collect a process memory dump, or this issue is recursive and you require a root cause analysis, proceed with collecting an OS memory dump below, the proceed to open a support request.

Collect an OS memory dump

If the issue does not resolve after waiting for the changes to process, you would need to collect a memory dump file and contact support. To collect the Dump file, follow these steps:

Attach the OS disk to a recovery VM

  1. Take a snapshot of the OS disk of the affected VM as a backup.

The different pricing tiers that you can choose for your app service plan are listed below :

  1. Free Tier
  2. Shared Tier
  3. Basic Tier
  4. Standard Tier
  5. Premium Tier
  6. Isolated Tier

Free and Shared tiers host the app services on shared virtual machines where some of the other apps could belong to other customers. There is no SLA for these tiers and unlike all the other tiers, these tiers are priced on a per-app basis.

Basic, Standard and Premium tiers offer different set of capabilities with basic tier offering the minimal set of capabilities needed to run an app service and premium is the most feature-rich tier offering features like auto-scaling, custom domains, SSL support etc. Basic tier is recommended for dev/test workloads whereas Standard and Premium tiers are recommended for production workloads.

Basic – B1/B2/B3, Standard – S1/S2/S3 and Premium – P1v2/P2v2/P3v2). All these tiers are priced based on the size and the number of instances.

Lastly, Isolated tier is linked with private isolated environments called as App Service Environments. Isolated tier is recommended for mission critical workloads which require network isolation.

For more details on different pricing tiers, please visit – https://azure.microsoft.com/en-us/pricing/details/app-service/windows/

Now lets understand the pricing in more detail.

When you create a new app service, you can create an app service plan with it or you can use an existing app service plan as shown below:

An app service plan can also be created directly as shown below:

The moment an app service plan is configured, Microsoft starts the billing irrespective of the number of apps running in the app service plan.

  • Detach the disk containing the files needed from the working VM and attach the disk to your broken VM. We are calling this disk the Utility disk.

  • Use Serial Console to complete the following steps:

    1. Open an administrative PowerShell and check the service that stops responding upon stopping.

      Get-Service | Where-Object {$_.Status -eq “STOP_PENDING”}

    2. On an administrative CMD, get the PID of the unresponsive service.

      tasklist /svc | findstr /i <STOPING SERVICE

    3. Get a memory dump sample from the unresponsive process <STOPPING SERVICE.

      procdump.exe -s 5 -n 3 -ma <PID

    4. Now kill the unresponsive process to unlock the shutdown process.

      taskkill /PID <PID /t /f

    Once the OS starts again, if it boots normally, then just ensure the OS consistency is ok.

    Are you using the latest version of the SDK? I believe they fixed this in the newest release of the SDK (6th of May 2016), version 2.0.217 . In the release notes they state:

    The FabricHost service was incorrectly marked as autostart for local development clusters which would cause the cluster to be restarted on reboot, and resetting or re-creating the local development cluster would reset FabricHost to autostart mode. This would lead to local resource consumption and was frequently undesired for the local cluster environment. Changes were made to support non-autostart for local development environments and not to override user choice here.

    otherwise you can use the manager to close a cluster.

    Leave a Reply

    Your email address will not be published.