locked
Deploy templates in Azure Stack using Visual Studio fails in command New-AzureRmResourceGroup RRS feed

  • Question

  • Hi all,

    When I try deploy a simple vm windows template (github) fails with following error in command New-AzureRmResourceGroup:

    Visual Studio 2015 Upadte 1 output shows:

    16:39:13 - Launching deployment PowerShell script with the following command:

    16:39:13 - 'C:\Users\Administrator\Documents\Visual Studio 2015\Projects\VSAzureStack\VSAzureStack\bin\Debug\staging\VSAzureStack\Deploy-AzureResourceGroup.ps1' -StorageAccountName '' -ResourceGroupName 'VSAzureStack' -ResourceGroupLocation 'local' -TemplateFile 'c:\users\administrator\documents\visual studio 2015\projects\vsazurestack\vsazurestack\templates\azuredeploy.json' -TemplateParametersFile 'c:\users\administrator\documents\visual studio 2015\projects\vsazurestack\vsazurestack\templates\azuredeploy.parameters.json' -ArtifactStagingDirectory '.' -DSCSourceFolder '.\DSC'

    16:39:13 -

    16:39:13 -

    16:39:13 - Environment : AzureStack.local-Api

    16:39:13 - Account : tenant1@xxx.onmicrosoft.com

    16:39:13 - TenantId : xxxxxx-df0d-44ad-933b-xxxxxxxxx

    16:39:13 - SubscriptionId : xxxxxxxx-ebf1-465e-8d62-xxxxxxxxx

    16:39:13 - SubscriptionName : subscription3

    16:39:13 - CurrentStorageAccount :

    16:39:14 -

    16:39:14 - [ERROR] The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Operation returned an invalid status code 'BadRequest'

    [ERROR] + CategoryInfo : CloseError: (:) [New-AzureRmResourceGroup], CloudException

    [ERROR] + FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.NewAzureResourceGroupCmdlet

    Any idea?

    Ivan

    Thursday, September 15, 2016 8:08 PM

All replies

  • Hi Ivan, looks like an invalid API version. Use the templates @ https://github.com/Azure/AzureStack-QuickStart-Templates. Or try to match the verssion with the API version available with your Azure Stack deployment. Also see the same page about ARM limitations in Azure Stack.

    If everything fails then you can always try the Februari release of Azure PowerShell which should be compatible with the AzureStack ARM version.



    Cheers,

    Ruud
    Twitter:    Blog: www.ruudborst.nl  LinkedIn:    
    Note: Please “Vote As Helpful” if you find my contribution useful or “Mark As Answer” if it does answer your question. That will encourage me - and others - to take time out to help you.

    Friday, September 16, 2016 9:26 AM