Start Azure V2 VMs

This Graphical PowerShell runbook connects to Azure using an Automation Run As account and starts all V2 VMs in an Azure subscription or in a resource group or a single named V2 VM. You can attach a recurring schedule to this runbook to run it at a specific time. The asso

 
 
 
 
 
4.4 Star
(19)
57,755 times
Add to favorites
Windows Azure
10/23/2016
E-mail Twitter del.icio.us Digg Facebook
Sign in to ask a question


  • VM Failed to start
    4 Posts | Last post Wed 1:20 PM
    • Hi,
      
         the script runs correctly and the virtual machine starts. However, when I see the job log, the output is "VM failed to start". Do you kwnow why?
      
      Thanks in advance
    • I had this problem too. What I did was change the condition expressions for Notify VM Started and Notify Failed To Start to the following respectively. The issue was that the original condition .Status "Succeeded" is not part of the output from Start VM so it will always fail.
      
      $ActivityOutput['Start VM'].IsSuccessStatusCode -eq $true
      
      $ActivityOutput['Start VM'].IsSuccessStatusCode -ne $true
    • Hi, I've been using this great script for a while to start 3 VM. As they are the only vm in the only resource group, I dont need to specify any imput parameters. Sadly since november, the vm wont start or only two of them will start with a delay. As an example, I use only one schedule at 8am, it uses to start the 3 vm before 8:10. Now, the first machine starts at 9, the otherone at 10:30 an the lastone wont start at all. 
      
      the only logs that I get is: 
      
      RunbookFlow : Long running operation failed with status 'Failed'.
      StartTime: 2/16/2018 9:00:30 AM
      EndTime: 2/16/2018 11:55:13 AM
      OperationID: 813313db-431f-4c26-b8b2-4d5edae5d142
      Status: Failed
      ErrorCode: InternalOperationError
      ErrorMessage: Operation abandoned due to internal error. Please try again later.
      At line:9 char:57
      + <#-- Enable activity tracing to see error location --#> RunbookFlow `
      +                                                         ~~~~~~~~~~~~~
          + CategoryInfo          : CloseError: (:) [Invoke-RunbookFlow], ComputeCloudException
          + FullyQualifiedErrorId : Orchestrator.GraphRunbook.Cmdlets.InvokeRunbookFlowCommand
      
      I've tried out common things like redeploying the runbook, using multiple schedule for each machine, etc, etc. 
      
      Any thoughts of whats going on?
      I've also recreated the automation account. 
    • It seems that there is an open Issue with the powershell command Start-AzureRmVM (https://github.com/Azure/azure-powershell/issues/6223).
      The comand stays running for a long time, although the VM is correctly started. When the job exceeds 3 hours, Azure kills the Job. As a result, I´ve had to change my automation account type to paid, so my jobs keeps running after 500 monthly free automation minutes. Maybe if everyone keeps commenting on the github link and put some pressure this problem gets addressed.
  • Only Starts One VM
    1 Posts | Last post March 02, 2018
    • Hi,
      
      I have shutdown 4 VMs and when I run this script it will start the first one then it will just sit there and never finish. I run it again and it starts the next one. Any ideas why it won't start all the VMs?
  • $ActivityOutput['Get VM'].Statuses
    2 Posts | Last post February 02, 2018
    • Where does this collection get set? This did not return anything when I tried reproducing this automated script.
    • Murphy's law.  Now that I ask, it's working! Never mind me. Just a newbie!
  • VM Failed to Start
    1 Posts | Last post November 09, 2017
    • We've been using this script for over a year now with great results. Over the past few months, however, I've been receiving the following error message: 
      
      ABC-Server failed to start. Error was:
          + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
          + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException
      
      Looks like the same error Etorrescobos describes in his question. The VM starts and stops just fine, it just logs this error. Any idea why? 
  • Parallel start
    4 Posts | Last post September 28, 2017
    • It seems it starts each VM sequentially, taking some time to finish and wasting Job Time. Could you change to Start all VMs at once?
      Thanks
    • Did you find a way to start them all at once?
    • it would be great if the action can happen in parallel
    • You have to create more schedeules for the same Runbook. If you create two schedeules in wihch you write different imput data (each VM name) you can run the same Runbook at the same time
  • Breaking change notice
    1 Posts | Last post March 24, 2017
    • I've been using this script for months and started receiving an error:
      
      Breaking change notice: In upcoming release, top level properties, DataDiskNames and NetworkInterfaceIDs, will be removed from VM object because they are also in StorageProfile and NetworkProfile, respectively.
      RunbookFlow : Resource group 'RESOURCE-GROUP' could not be found.
      ErrorCode: ResourceGroupNotFound
      ErrorMessage: Resource group 'RESOURCE-GROUP' could not be found.
      StatusCode: 404
      ReasonPhrase: Not Found
      OperationID : SOME_GUID_HERE
      At line:9 char:57
      + <#-- Enable activity tracing to see error location --#> RunbookFlow `
      +                                                         ~~~~~~~~~~~~~
          + CategoryInfo          : CloseError: (:) [Invoke-RunbookFlow], ComputeCloudException
          + FullyQualifiedErrorId : Orchestrator.GraphRunbook.Cmdlets.InvokeRunbookFlowCommand
      
      Odd enough, this script will run on some VM's but not on others.
      
      Thoughts?