Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/azure/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Mongodb OS类型';不支持每个处理程序有多个VMExtensions;Linux_Mongodb_Azure_Azure Storage_Redhat_Azure Resource Manager - Fatal编程技术网

Mongodb OS类型';不支持每个处理程序有多个VMExtensions;Linux

Mongodb OS类型';不支持每个处理程序有多个VMExtensions;Linux,mongodb,azure,azure-storage,redhat,azure-resource-manager,Mongodb,Azure,Azure Storage,Redhat,Azure Resource Manager,我已经使用ARM模板创建了Azure VM。现在我想在Azure VM上安装Java和Mongodb 当我尝试使用多个CustomScript时,会出现以下错误 Multiple VMExtensions per handler not supported for OS type 'Linux 以下是我的配置:- 参数:- "javaPackageName": { "type": "string", "defaultValue": "openjdk-7-jdk", "a

我已经使用ARM模板创建了Azure VM。现在我想在Azure VM上安装Java和Mongodb

当我尝试使用多个CustomScript时,会出现以下错误

Multiple VMExtensions per handler not supported for OS type 'Linux
以下是我的配置:-

参数:-

"javaPackageName": {
    "type": "string",
    "defaultValue": "openjdk-7-jdk",
    "allowedValues": [
        "openjdk-6-jdk",
        "openjdk-7-jdk",
        "openjdk-8-jdk"
    ]
},
"tomcatPackageName": {
    "type": "string",
    "defaultValue": "tomcat7",
    "allowedValues": [
    "tomcat6",
    "tomcat7",
    "tomcat8"
    ]
}
变量:-

“mongoInstallCentos”:“https:/…安装mongo.json”

有没有在ARM模板中使用多个CustomScript的解决方案?请帮我解决这个问题

操作系统类型“Linux”不支持每个处理程序有多个VMExtensions

目前,无法在部署时运行多个CustomScript扩展

根据您的场景,您可以编写一个调用依赖脚本的入口点脚本,然后将入口点脚本、依赖脚本和任何其他依赖二进制文件上载到脚本位置(Azure storage blob或GitHub)。更多信息请参考此

另外,你也可以参考类似的例子

操作系统类型“Linux”不支持每个处理程序有多个VMExtensions

目前,无法在部署时运行多个CustomScript扩展

根据您的场景,您可以编写一个调用依赖脚本的入口点脚本,然后将入口点脚本、依赖脚本和任何其他依赖二进制文件上载到脚本位置(Azure storage blob或GitHub)。更多信息请参考此


此外,您也可以参考类似的内容。

您可能可以链接使用嵌套模板的内容您可能可以链接使用嵌套模板的内容
{
    "type": "Microsoft.Compute/virtualMachines/extensions",
    "name": "[concat(parameters('virtualMachineName'),'/javainstall')]",
    "apiVersion": "2015-05-01-preview",
    "location": "[variables('location')]",
    "dependsOn": [
        "[concat('Microsoft.Compute/virtualMachines/', parameters('virtualMachineName'))]"
    ],
    "properties": {
        "publisher": "Microsoft.Azure.Extensions",
        "type": "CustomScript",
        "typeHandlerVersion": "2.0",
        "autoUpgradeMinorVersion": true,
        "settings": {
        "fileUris": ["https://..java-tomcat-install.sh"],
        "commandToExecute": "[concat('sh java-tomcat-install.sh',' ',parameters('javaPackageName'),' ',parameters('tomcatPackageName'))]"
        }
    }
},
{
    "type": "Microsoft.Compute/virtualMachines/extensions",
    "name": "[concat(parameters('virtualMachineName'),'/mongoinstall')]",
    "apiVersion": "2015-05-01-preview",
    "location": "[variables('location')]",
    "dependsOn": [
        "[concat('Microsoft.Compute/virtualMachines/', parameters('virtualMachineName'))]"
    ],
    "properties": {
        "publisher": "Microsoft.Azure.Extensions",
        "type": "CustomScript",
        "typeHandlerVersion": "2.0",
        "autoUpgradeMinorVersion": true,
        "settings": {
        "fileUris": ["https://..mongo-install.sh"],
        "commandToExecute": "sh mongo-install.sh"
        }
    }
},