【发布时间】:2018-01-21 03:42:37
【问题描述】:
我花了一天时间尝试从模板存储帐户在 Azure 中部署一些 VM。
我使用Set-AzureRmCurrentStorageAccount设置存储帐户,然后将变量分配给$token = New-AzureStorageContainerSASToken
我收到错误消息:
AuthenticationFailed服务器失败 验证请求。确保 Authorization 标头的值 格式正确,包括签名。 请求编号:3408956-0001-00ea-4cd1-2135c2000000 时间:2017-08-12T21:27:54.6479108Z 签名不匹配。要签名的字符串 使用的是 r 2017-08-12T22:26:51Z /blob/homeworktest/blob 2016-05-31
powershell错误信息是
Message=Unable to download deployment
content from 'https://storageaccountname.blob.core.windows.net/blob/azuredeploy.json'
当我从 $token 获取变量时,它会显示密钥,然后我使用该密钥与 URI 一起通过显示上述消息的浏览器访问 json 文件。
我正在使用的整个代码如下
Set-AzureRmContext -SubscriptionId "xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx"
Set-AzureRmCurrentStorageAccount -ResourceGroupName "ResGp" -Name "Storageaccount"
$token2 = New-AzureStorageContainerSASToken -Name "json" -Permission r -ExpiryTime (Get-Date).AddMinutes(60.0)
New-AzureRmResourceGroupDeployment -name Demo -ResourceGroupName ResGp `
-TemplateFile "https://storageaccountname.blob.core.windows.net/blob/azuredeploy.json" `
-TemplateParameterFile "https://storageaccountname.blob.core.windows.net/blob/azuredeploy.parameters.json" -verbose
我看不出我做错了什么,还是我的整个方法有缺陷?
任何帮助\指导将不胜感激
提前致谢:)
【问题讨论】:
标签: azure azure-storage azure-blob-storage azure-powershell