【发布时间】:2017-03-02 16:51:58
【问题描述】:
我正在尝试为 SQL Server 2016 创建一个 ARM 模板。在检查来自官方 Azure Github 存储库的 SQL Server ARM 模板(并且只有 SQL Server 2014 模板)后,我发现它们的逻辑与 SQL Server 2014 通过 Marketplace Web Interface 部署,即: 1、部署SQL Server 2014镜像 2.部署嵌套模板https://sqlvmgroup.blob.core.windows.net/singlevm/preparingSqlServerSa.json 3.执行DSChttps://sqlvmgroup.blob.core.windows.net/singlevm/PrepareSqlServer.ps1.zip 这个过程没有很好的记录(如果有的话)。我能找到的唯一解释是微软员工制作的 ARM 模板自述文件和日本 MVP 的几篇博文(谷歌翻译在这些帖子上效果很好): Create a new SSRS Server with a SQL catalog (2 Machines) [JAP]Understand the deployment flow of Azure's deployment of SQL Server installed virtual machines [JAP]Use the ARM template to perform SQL Server preparation tasks 但是,当我尝试对 SQL Server 2016 使用相同的步骤时,我收到 DSC 错误:
"VM has reported a failure when processing extension 'dscExtension'. Error message: "DSC Configuration 'PrepareSqlServerSa' completed with error(s). Following are the first few: Cannot validate argument on parameter 'StorageSubSystemUniqueId'. The argument is null. Provide a valid value for the argument, and then try running the command again. No MSFT_StoragePool objects found with property 'FriendlyName' equal to 'SqlVMStoragePoll'. Verify the value of the property and retry. No MSFT_VirtualDisk objects found with property 'FriendlyName' equal to 'SqlVMDataDisk'. Verify the value of the property and retry.
我的猜测是来自 SQL Server 2014 的 DSC 代码与 SQL Server 2016 不兼容。所以,我有 2 个问题。 Azure Marketplace 如何部署 SQL Server 2016,我如何使用 ARM 模板可靠地复制它?
【问题讨论】:
-
嘿,对你有用吗?只是问,没有压力;)
-
嘿,不是真的。该 SQL IaaS 扩展没有记录,甚至没有在 ARM 模式中定义。您会看到,SQL Server 2014 曾经使用prepareSqlServer.json 嵌套模板和PrepareSqlServer.ps1.zip DSC 进行部署,正如我在问题帖子中链接的日语文章中指出的那样(直到最近)。通过阅读 DSC,我们可以清楚地了解里面发生了什么。但是现在,也没有办法说。此外,您链接的导出模板具有“ServerConfigurationsManagementSettings”定义。在 Github 或文档中找不到此定义。
-
该定义替换了 DSC 中的“xSqlCreateVirtualDisk AddVirtualDisk”,但是当我使用该定义进行部署时,我的服务器上也安装了俄语键盘语言(wtf?)。所以我担心 Azure 自动化不会将它所做的一切导出到图像中(为什么微软的人在他们的 Github 示例中使用 DSC 扩展?)如果我使用 SQL IaaS 扩展,我看不到它的作用,有些东西会未正确部署。就像它不会添加一些重要的部分,甚至会破坏一些东西。