question

GarryLowther-3928 avatar image
0 Votes"
GarryLowther-3928 asked tbgangav-MSFT edited

I can auto-shutdown VM's, but can I also auto-start VM's from the Azure Portal?

I can auto-shutdown VM's, but can I also auto-start VM's from the Azure Portal?

azure-virtual-machinesazure-logic-appsazure-automation
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I tried your 'labs preview' but got an error. Unfortunately this tool does not allow me to upload a PNG

0 Votes 0 ·
pituach avatar image
0 Votes"
pituach answered GarryLowther-3928 commented

Hi,

There are few great solutions mentioned in the comment already.

Basically, you can so (almost) everything using PowerShell and as such you can do anything automatically using any schedule tool which you want to use.

You can even use your personal laptop to trigger starting the VM using the Windows Task Scheduler.

Just select your scheduler tool (on-premises or one of the Azure services) to schedule tasks and execute the PowerShell command to start your VM.

Checkout the comment written by @tbgangav-MSFT and @AlanKinane for solutions related to Azure services.

Using PowerSehll `cmdlet` to start an Azure virtual machine.

 Start-AzVM -ResourceGroupName "ResourceGroup11" -Name "VirtualMachine07"



· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks for your response, but surely a new menu option called "Auto-Start" right next to the "Auto-shutdown" menu option in the Azure portal would be simpler for me, the customer?
I have a large Microsoft skillset however I also know that 'developing stuff' rather than clicking a menu option is much more expensive for me, a Microsoft customer!

0 Votes 0 ·
AlanKinane avatar image
1 Vote"
AlanKinane answered AlanKinane commented

There are several ways that you can do this - Automation Account, Azure Function, Logic App....

The easiest approach is the Logic App that you can deploy as part of the Virtual Machine automation features.

Take a look at this: https://docs.microsoft.com/en-us/azure/logic-apps/create-automation-tasks-azure-resources

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi Alan
Thanks for your answer, but surely the easiest approach is for Microsoft to provide a menu option called "Auto-Start" right next to the "Auto-shutdown" menu option in the Azure portal?

Here is a screenshot showing exactly where this option should reside:

204723-azure-auto-start.png


0 Votes 0 ·
AlanKinane avatar image AlanKinane GarryLowther-3928 ·

Hi Garry, yes I hear you but I suspect that Microsoft have deliberately left this feature out for a reason!

Therefore, the current options are as previously mentioned and this has been the way for many years now.

1 Vote 1 ·
tbgangav-MSFT avatar image
1 Vote"
tbgangav-MSFT answered tbgangav-MSFT edited

Hi @GarryLowther-3928,

As mentioned by @AlanKinane, there are several ways to do this i.e., using Azure Automation, Azure Logic App, Azure Function App, etc. In addition to Automation tasks approach that's already mentioned by @AlanKinane, you can use any of the below approaches as well.

  1. Leverage Start/Stop VMs during off-house feature

  2. Create your own Azure Automation PowerShell runbook using Start-AzVM cmdlet and use Azure Automation schedules to schedule that runbook.

  3. Create Azure Function App and write code using Start-AzVM cmdlet. For example, you may refer this article.

· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks for your response, but surely a new menu option called "Auto-Start" right next to the "Auto-shutdown" menu option in the Azure portal would be simpler for me, the customer?

0 Votes 0 ·
tbgangav-MSFT avatar image tbgangav-MSFT GarryLowther-3928 ·

@GarryLowther-3928

Got it. Yes, currently there is no menu option called "Auto-Start" right next to the "Auto-Shutdown" in the Azure Portal. This is the related feature request which has already been raised in the feedback forum. In general, Azure feature or product team would check feasibility of a feature request, triage it, prioritize against existing feature backlog, add in roadmap as appropriate and would announce and/or update the related Azure document once a feature request is addressed.

1 Vote 1 ·

Basically yes, I suspect this is not a priority for Microsoft to develop this feature for a number of reasons not withstanding the current alternative methods there are to perform this task.

0 Votes 0 ·