2017-03-02 39 views
0

我正在嘗試爲SQL Server 2016創建ARM模板。從官方Azure Github倉庫(並且僅存在SQL Server 2014模板)檢查SQL Server ARM模板時,我發現他們的邏輯與如何通過Marketplace Web Interface部署SQL Server 2014是一致的: 1.部署SQL Server 2014圖像 2.部署嵌套模板https://sqlvmgroup.blob.core.windows.net/singlevm/preparingSqlServerSa.json 3.執行DSC https://sqlvmgroup.blob.core.windows.net/singlevm/PrepareSqlServer.ps1.zip 此過程沒有很好的記錄(如果有的話)。只爲這是我能找到的解釋是由微軟員工以及來自日本的MVP一對夫婦的相關博客文章中(谷歌翻譯作品以及對這些職位)製作的ARM模板自述: 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錯誤:天青RM模板。如何使SQL Server 2016與市場部署一致

"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模板可靠地複製它?

+0

嘿,它爲你工作嗎?只是問,沒有壓力;) – 4c74356b41

+0

嘿,不是真的。 SQL IaaS擴展沒有記錄,甚至沒有在ARM架構中定義。你會發現,SQL Server 2014曾經與PrepareSqlServer.json嵌套模板和PrepareSqlServer.ps1.zip DSC一起部署,正如我在問題帖子中鏈接的日文文章(直到最近)中所指出的那樣。通過閱讀DSC我們可以清楚地瞭解內部發生了什麼。但現在,沒有辦法說。此外,您鏈接的導出模板具有「ServerConfigurationsManagementSettings」定義。這個定義在Github或文檔中找不到。 – Max

+0

該定義替換DSC中的「xSqlCreateVirtualDisk AddVirtualDisk」,但是當我使用該定義進行部署時,我的俄語鍵盤語言也會安裝在我的服務器(wtf?)上。所以我很擔心Azure Automation不會將它所做的所有事情都導出到Image中(爲什麼Microsoft的用戶在他們的Github示例中使用DSC擴展?),如果我使用SQL IaaS Extension,我看不到它會做什麼,不能正確部署。就像它不會添加一些重要的作品,甚至會破壞一些東西。 – Max

回答

0

儘管我不知道你爲什麼要這樣做,我仍然會回答。

這裏是the link我的回購與Azure是使用部署SQL 2016,您可以使用以下方法很容易地創建一個自己的模板:

  1. 登錄到門戶網站,按「N」
  2. 搜索「SQL 2016」,並選擇將其部署到
  3. 填寫所有領域
  4. 導出模板

Export Template from the portal

正如您從模板中看到的那樣,它們使用SQL IaaS擴展來提供SQL。你應該也可以這樣做。