Azure VM Scheduler tasks not running

Azure VM Scheduler tasks not running

Azure VM Scheduler tasks not running

If you are having any issues with the Azure VM Scheduling tool not running a scheduled task, it could be one of the following issues

First thing to check is your log file which is located in the following location:

C:Program Files (x86) – SMIKAR Software – AVMS – avms.log

Error 1:

Scour through the log file and look for something similar to below:

01/11/2016 11:23:46 AM Attempting to ADD-azureaccount using account XXXX@XXXX.onmicrosoft.com
01/11/2016 11:23:46 AM Failed to ADD-azureaccount using account XXXX@XXXX.onmicrosoft.com – error user_realm_discovery_failed: User realm discovery failed: The remote server returned an error: (407) Proxy Authentication Required.

So the issue in the above example is that your onsite proxy server requires authentication to allow AVMS to talk to Azure.

The reason why the AVMS console can connect to Azure is because it is running under your own Domain Account and has the appropriate permissions to use the proxy server. The scheduled task however runs under your computers system account and more than likely does not have this permission.

So how do you fix this you ask?

Well go in to your control panel, then in to scheduled tasks. Highlight the AVMS task, right click it and choose properties.

Azure VM Scheduler Tasks

Next you need to change the user account from System to a domain and proxy appropriate account with the highest privileges you can.

Azure VM Scheduler tasks 2

AVMS will now run its scheduled tasks.

Error 2:

Again through the log another possible error to look out for is;

01/11/2016 12:45:23 PM Attempting to ADD-azureaccount using account XXXX@XXXX.onmicrosoft.com
01/11/2016 12:45:23 PM Connected to ADD-azureaccount using account XXXX@XXXX.onmicrosoft.com
01/11/2016 12:46:56 PM Attempting to ADD-AzureRmAccount using account XXXX@XXXX.onmicrosoft.com
01/11/2016 12:46:56 PM Connected to ADD-AzureRmAccount using account XXXX@XXXX.onmicrosoft.com
01/11/2016 12:46:56 PM Started code block to Stop VMs
01/11/2016 12:46:56 PM Adding servers to array for email
01/11/2016 12:46:56 PM email form created notifying task has started

If your log file stops as shown in the above, it is your email settings that are causing AVMS to not progress any further. Please check and confirm your email settings are correct, alternatively turn off notifications. Please be warned, turning this off will result in you not receiving any emails from the AVMS software.

Automate Azure Shutdown

Automate Azure Shutdown

Automate the Shutdown and Startup of your Azure VMs

If you’re using Microsoft Azure, you know that time is money when it comes to running virtual machines. Fortunately, you can automate the shutdown and startup of your Azure VMs to save both. In this article, we’ll explore the benefits of automating your virtual machine schedules and provide a step-by-step guide to getting started..

Azure Overview

As one of the leading providers of IAAS, SAAS, PAAS, and DRAAS, Microsoft’s Azure cloud is flexible and supports a huge selection of operating systems and programming languages. You can run Windows or Linux servers, as well as Windows and Linux containers with Docker integration. Azure also allows you to build applications on a solid, highly scalable infrastructure built by Microsoft.

Benefits of Microsoft Azure Cloud Offering

Some of the benefits of Microsoft’s Azure cloud offering include:

  • No upfront costs
  • No termination fees
  • Pay only for what you use
  • Per minute billing
  • Quick to build, deploy, and scale (up or down)

Automating Azure VM Shutdown and Startup

To save time and money, especially with virtual machines that aren’t required to operate outside regular business hours (for example, development and test VMs), having the ability to automate a scheduled shutdown and power back on of your virtual machines is crucial. Here’s how to get started:

Download and Install Azure Virtual Machine Scheduler (AVMS)

First, download and install the Azure Virtual Machine Scheduler (AVMS) that we’ve developed. You can run this application within your on-premise network as long as it has internet access, or alternatively, as a Virtual Machine running within Azure itself. However, if you’re running it in Azure, be mindful not to select this machine to be one of those you choose to power down.

Configure Azure Virtual Machine Scheduler (AVMS)

Once installed, configure the Azure Virtual Machine Scheduler by following the instructions provided in the link.

Automate Azure VM Shutdown and Startup

Now that you’ve installed and configured the Azure Virtual Machine Scheduler, it’s time to automate the shutdown and startup of your VMs. Follow the link to see how to automate Azure shutdown and power on of your virtual machines.

Automating the shutdown and startup of your Azure VMs is a simple but effective way to save time and money. With Microsoft’s Azure cloud, you have the flexibility and scalability to meet all your business needs. Follow the step-by-step guide we’ve provided to start automating your virtual machine schedules today.

How to Automate a scheduled power down and on of Azure VMs

How to Automate a scheduled power down and on of Azure VMs

How to Automate a scheduled power down and on of Azure VMs

Automate the Shutdown

If you need to create an automated process that shuts down or powers on your Azure VMs to save you from paying fees to Microsoft for services while they are not being utilised, you can do this with the Azure Virtual Machine Scheduler tool that we have created. AVMS as it is known can automate a schedules that you specify to do all this for you and to send you email alerts during the process. You could use AVMS for your Development and Test systems housed within Azure, saving you money while they are not being used.

It is quite a simple process to create a new schedule. Open up the Azure Virtual Machine Scheduling tool and first let it sync with your Microsoft Azure Subscriptions so that it can populate all your VMs.

Start your Azure VM Automation Schedule

Click the Virtual Machines Icon to show your Azure virtual machines.

Schedule Azure VM shutdown

List all your Azure VMs

The Azure VM Scheduler / Orchestrator will scan your total Azure Environment and list all your Azure VMs.

Shutdown Azure VM

Select your Azure VMs

Select the Azure VMs you want to either power down or power on and make sure that you tick the according checkbox for each machine. Once you have selected all the machines you wish, right click in the console as below and choose create new schedule.

Azure Create new schedule

Azure VM Schedule Details

Next, give the schedule a name, use the drop down box to choose whether to automate a power on or shutdown schedule for your Azure Virtual Machines and then a description if you wish to do so. Click OK  to continue. In the example below, we can see we are creating a Power on Schedule. Keep in mind, if you wish to power machines on and then off, you will need to go through these steps twice, choosing the appropriate Job type.

Azure VM Schedule Creation

Schedule the Power on of your Azure VMs

Click NEW to create a new schedule

AVMS Power On Schedule execute

Choose your Azure VM Power On date and time

Now choose a date and time you wish your Azure virtual machines to Power On. Click OK when ready.

Azure VM Power On Schedule

Confirm the Azure VM Power On schedule

Confirm the Date and Time are what you created and then click OK.

Azure VM Power On Schedule Complete

Thats all there is to it. You have now automated a scheduled power down or power on of your virtual machines within Azure.

The Azure Virtual Machine Scheduling tool will now start up your virtual machines with Microsoft’s Azure cloud at the time you specified. If you have setup email alerts, you will be notified when the job starts and completes.

Azure VM Shutdown Schedule

If you now need to complete a Power Off schedule, go through these same steps again, but choose Shutdown Virtual Machines (Deallocate) as show in the window below.

Azure VMS Power On Schedule 6

Click this link to learn more about the Azure Virtual Machine Scheduler. Feel free to Download a fully functioning 30 day trial and test it for yourself.

Also, see the other products that SmiKar Software have developed. From SnaPatch our patch management addon for SCCM, SnapShot Master that automates your Vmware or Hyper-V snapshots and even AVMD our free tool that helps deploy Virtual Machines to Microsoft’s Azure cloud.

The Azure Virtual Machine Scheduler tool is an excellent way to automate the power down and on of your Azure VMs, saving you money while they are not being used. It is a straightforward process that can be completed within a matter of minutes. Try it out for yourself and see how it can benefit you. For more information on the Azure Virtual Machine Scheduler and other tools developed by SmiKar Software, click the link provided in this article.