Powershell 模板部署无效
直到几周前,我还可以基于我们创建的模板部署新的Azure VM。现在我收到以下错误消息Powershell 模板部署无效,powershell,azure,templates,Powershell,Azure,Templates,直到几周前,我还可以基于我们创建的模板部署新的Azure VM。现在我收到以下错误消息 VERBOSE: Performing the operation "Replacing resource group ..." on target "". VERBOSE: 12:45:43 PM - Created resource group 'Core613a-RGP' in location 'eastus2' Creating storage account core613astr ...
VERBOSE: Performing the operation "Replacing resource group ..." on target "".
VERBOSE: 12:45:43 PM - Created resource group 'Core613a-RGP' in location 'eastus2'
Creating storage account core613astr ...
VERBOSE: Performing the operation "Creating Deployment" on target "Core613a-RGP".
New-AzureRmResourceGroupDeployment : 12:51:18 PM - Error: Code=InvalidTemplateDeployment; Message=The template
deployment 'azuredeploy-Core613a-0221-1851' is not valid according to the validation procedure. The tracking id is
'ce71bcac-7a7b-40a8-b920-06f5322984fe'. See inner errors for details. Please see https://aka.ms/arm-deploy for usage
details.
At C:\Code\Azure\Core613a\Deploy-Core613a.ps1:191 char:1
+ New-AzureRmResourceGroupDeployment -Name ((Get-ChildItem $TemplateFil ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [New-AzureRmResourceGroupDeployment], Exception
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.NewAzureResourceGroupDep
loymentCmdlet
New-AzureRmResourceGroupDeployment : The deployment validation failed
At C:\Code\Azure\Core613a\Deploy-Core613a.ps1:191 char:1
+ New-AzureRmResourceGroupDeployment -Name ((Get-ChildItem $TemplateFil ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [New-AzureRmResourceGroupDeployment], InvalidOperationException
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.NewAzureResourceGroupDep
loymentCmdlet
Get-AzureRmPublicIpAddress : The Resource 'Microsoft.Network/publicIPAddresses/Core613a-PIP' under resource group
'Core613a-RGP' was not found.
StatusCode: 404
ReasonPhrase: Not Found
OperationID : 'c272c46b-edef-4846-a460-7529d372a400'
At C:\Code\Azure\Core613a\Deploy-Core613a.ps1:202 char:13
+ ... $vmPubIP = Get-AzureRmPublicIpAddress -ResourceGroupName $ResourceGr ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Get-AzureRmPublicIpAddress], NetworkCloudException
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.Network.GetAzurePublicIpAddressCommand
The property 'DnsSettings' cannot be found on this object. Verify that the property exists.
At C:\Code\Azure\Core613a\Deploy-Core613a.ps1:205 char:41
+ ... te-Host "Your FQDN is: $($vmPubIP.DnsSettings.Fqdn)" -fore ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], PropertyNotFoundException
+ FullyQualifiedErrorId : PropertyNotFoundStrict
Your FQDN is:
The property 'IpAddress' cannot be found on this object. Verify that the property exists.
At C:\Code\Azure\Core613a\Deploy-Core613a.ps1:206 char:41
+ Write-Host "Your IP address is: $($vmPubIP.IpAddress)" -fore ...
+ ~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], PropertyNotFoundException
+ FullyQualifiedErrorId : PropertyNotFoundStrict
我的假设是在验证过程中会发生一些变化,但我不确定如何追踪问题
以下内容用于启动整个流程
这是部署模板
参数模板
获取AzureRmResourceGroupDeployment
并查找错误同样,对于一个简单的vm,您的部署过程看起来过于复杂deployment@Jason我一步一步地执行你的cmdlet,我可以创建公共IP。如果可能的话,我建议你一步一步地测试并找出错误原因。