json - 网站创建失败,找不到服务器场 Azure Powershell

标签 json powershell azure server-farm

我正在努力使用 powershell 和 GalleryTemplate Json 文件创建 Drupal Web 应用程序。它创建 Serverfarm、数据库服务器,但网站创建失败。我无法弄清楚如何继续进行,因为网站创建需要使用创建的托管计划服务器场。获得以下专业知识帮助将有很大帮助。提前致谢。

GalleryTemplateIdentity :: Acquiacom.AcquiaDrupal7SQL.0.3.16-preview

PS C:\scripts> New-AzureResourceGroup -Name azurepowershellush -TemplateFile F:\DeployerScript\Acquiacom.AcquiaDrupal7SQL.0.3.16-preview.json -StorageAccountName pilot -Location "East US"

提示用户输入

WARNING: The Switch-AzureMode cmdlet is deprecated and will be removed in a future release.
cmdlet New-AzureResourceGroup at command pipeline position 1
Supply values for the following parameters:
(Type !? for Help.)
siteName: azureappush
hostingPlanName: DefaultServerFarm
serverFarmResourceGroup: DefaultServerFarm
siteLocation: East US
serverName: azureappush
serverLocation: East US
administratorLogin: adminXprt_1
databaseName: adminXprt_1
webDeploy_DatabaseUsername: adminXprt_1
webDeploy_DatabasePassword: Sample_1987

输出

New-AzureResourceGroup : 10:11:41 AM - Resource Microsoft.Web/Sites 'azureappush' failed with message 'Cannot find ServerFarm with 
name DefaultServerFarm.'

ResourceGroupName : azurepowershellush
Location          : eastus
Resources         : {azureappush, adminXprt_1, azurepowerush, azurepowerush1...}
ResourcesTable    : 
                    Name               Type                             Location
                    =================  ===============================  ========
                    azureappush        Microsoft.Sql/servers            eastus  
                    adminXprt_1        Microsoft.Sql/servers/databases  eastus  
                    azurepowerush      Microsoft.Sql/servers            eastus  
                    azurepowerush1     Microsoft.Sql/servers            eastus  
                    adminxprt_1        Microsoft.Sql/servers/databases  eastus  
                    adminxprt_1        Microsoft.Sql/servers/databases  eastus  
                    Default1           Microsoft.Web/serverFarms        eastus  
                    DefaultServerFarm  Microsoft.Web/serverFarms        eastus  

ProvisioningState : Succeeded
Permissions       : {Microsoft.Azure.Commands.Resources.Models.Authorization.PSPermission}

感谢和问候,

哈里什

最佳答案

网络应用程序似乎无法找到服务器场(也称为应用程序服务计划),因为它位于不同的资源组中。 要解决此问题,请尝试在同一资源组中创建 ServerFarm 和 Web 应用。

即使用此命令:

PS C:\scripts> New-AzureResourceGroup -Name "azurepowershellush" -TemplateFile F:\DeployerScript\Acquiacom.AcquiaDrupal7SQL.0.3.16-preview.json -StorageAccountName pilot -Location "East US" -siteName "azureappush"
-hostingPlanName "DefaultServerFarm" -serverFarmResourceGroup "azurepowershellush" -siteLocation "East US" -serverName "azureappush" -serverLocation "East US" -administratorLogin "adminXprt_1" -databaseName "adminXprt_1" -webDeploy_DatabaseUsername "adminXprt_1" -webDeploy_DatabasePassword "Sample_1987"

请注意,-Name 和 -serverFarmResourceGroup 都是“azurepowershellush”。

关于json - 网站创建失败,找不到服务器场 Azure Powershell,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30961425/

相关文章:

azure - 微软图形API : Accessing presences information via an Application scope

azure - 将两个阶段 fork 回一个 Azure 管道

javascript - 带有外部 CSV 的 Highchart(在外部域中)

javascript - 在 JQuery 中使用 JSON 填充 SELECT

Powershell DSC : Unable to load module xPSDesiredStateConfiguration

powershell - 移动项路径作为变量

c# - 在网络聊天中测试无法使用应用程序服务

php json 请求 : json_decode unicode string

javascript - MVC 模型绑定(bind)无法通过 AJAX 请求工作

powershell - Powershell脚本可列出多个服务器上的大文件