I have been using Powershell to create Winndows Virtual Machine and so far it has worked pretty well. My configuration looks like:
$vmConfig = New-AzureRmVMConfig -VMName $vmName -VMSize Standard_DS2 | `
Set-AzureRmVMOperatingSystem -Windows -ComputerName $vmName -Credential $Credential | `
Set-AzureRmVMSourceImage -PublisherName MicrosoftWindowsDesktop -Offer Windows-10 `
-Skus RS2-PRO -Version latest | Add-AzureRmVMNetworkInterface -Id $nic.Id | `
Set-AzureRmVmBootDiagnostics -Disable
Now I have changed the -Skus value to RS3-PRO, I am experiencing long delay at step:
New-AzureRmVM -ResourceGroupName $vmResourceGroupName -Location $vmLocation -VM $vmConfig
It has returned error:
New-AzureRmVM : Long running operation failed with status 'Failed'. ErrorCode: VMAgentStatusCommunicationError ErrorMessage: VM 'vmname' 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: 2017-11-15 20:59:34 EndTime: 2017-11-15 21:24:48 OperationID: d1dc18f6-2ac7-4205-b8e6-2fb74fa4cbf9 Status: Failed At C:\pathtoscipt.ps1:144 char:1 + New-AzureRmVM -ResourceGroupName $vmResourceGroupName -Location $vmLo ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : CloseError: (:) [New-AzureRmVM], ComputeCloudException + FullyQualifiedErrorId : Microsoft.Azure.Commands.Compute.NewAzureVMCommand
The VM is created though and can be reached via RDP too. Sometimes, the operation succeeds too. I created VM with same image via Azure portal and it got created with no problem. I have following questions:
Does anyone have face similar scenario?
Where should I look for logs about what is happening when the VM is being created.
enter
to refresh it. – Jason YeGet-Module -ListAvailable -Name Azure -Refresh
– Jason Ye