Home > Reshmee Auckloo, Work > Create Virtual Machine(VM) in Azure throws “Long running operation failed with status ‘Failed’.” through PowerShell

Create Virtual Machine(VM) in Azure throws “Long running operation failed with status ‘Failed’.” through PowerShell

I was following the article SharePoint Server 2016 dev/test environment in Azure to create a SharePoint Server 2016 environment in Azure.

I reached the step to create the Virtual Machine that will be used as the domain controller using the cmdlet below

New-AzureRMVM -ResourceGroupName $rgName -Location $locName -VM $vm

After waiting for several minutes I decided to cancel the operation. When I retried the same cmdlet, I got the following error.

New-AzureRMVM -ResourceGroupName $rgName -Location $locName -VM $vm -Verbose
VERBOSE: Performing the operation "New" on target "adVM".
New-AzureRMVM : Long running operation failed with status 'Failed'.
ErrorCode: VMAgentStatusCommunicationError
ErrorMessage: VM 'adVM' has not reported status for VM agent or extensions. 
Please verify the VM has a running VM agent, and can establish 
outbound connections to Azure storage.
StartTime: 18/11/2016 15:42:46
EndTime: 18/11/2016 15:42:46
OperationID: f1ecb302-9da9-4a76-9b0c-463b5e89c41c
Status: Failed
At line:1 char:1
+ New-AzureRMVM -ResourceGroupName $rgName -Location $locName -VM $vm -Verbose
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 + CategoryInfo : CloseError: (:) [New-AzureRmVM], ComputeCloudException
 + FullyQualifiedErrorId : Microsoft.Azure.Commands.Compute.NewAzureVMCommand

I spent a while trying to understand what the error message meant. In that scenerio the error message was thrown because the VM requested was created successfully even though I interrupted the operation before. The error thrown was to prevent creating another VM with the same details.

When I created the second VM, I waited long enough till the success message was displayed.

vmcreatedsuccessfully

from reshmeeauckloo http://bit.ly/2g2Rv3M

Reshmee Auckloo
Reshmee Auckloo – Reshmee is a certified Microsoft professional and has been involved in delivering solutions across a wide variety of industry sectors in a range of assignments from SSRS to Microsoft SharePoint, Project Server development, CRM Dynamics and .Net including business requirements gathering and software quality assurance.

This article has been cross posted from reshmeeauckloo.wordpress.com (original article)

Advertisement
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: