-1

I'm trying to create an ARM Template for SQL Server 2016. Upon inspecting SQL Server ARM templates from the official Azure Github repo (and there are only SQL Server 2014 templates) I found out that their logic is consistent with how SQL Server 2014 being deployed via Marketplace Web Interface that is: 1. Deploy SQL Server 2014 image 2. Deploy nested template https://sqlvmgroup.blob.core.windows.net/singlevm/preparingSqlServerSa.json 3. Execute DSC https://sqlvmgroup.blob.core.windows.net/singlevm/PrepareSqlServer.ps1.zip This process is not very well documented (if any). And only explanation for this that I was able to find is an ARM template readme made by Microsoft Employee and a couple of blogposts from a Japanese MVP (Google Translate works well on these posts): 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 However when I try to use the same steps for SQL Server 2016 I get DSC error:

"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.

My guess is DSC code from SQL Server 2014 is not compatible with SQL Server 2016. So, I have 2 questions. How Azure Marketplace deploys SQL Server 2016 and how can I replicate it reliably with ARM Templates?

Max
  • 35
  • 11
  • hey, did it work out for you? just asking, no pressure ;) – 4c74356b41 Mar 03 '17 at 19:25
  • Hey, not really. That SQL IaaS extension is not documented and not even defined in ARM schema. You see, SQL Server 2014 used to be deployed with preparingSqlServer.json nested template and PrepareSqlServer.ps1.zip DSC as I indicated in the Japanese articles I linked in the question post (until recently). And by reading DSC we could clearly understand what was going on inside. But now, there is no way to tell. Moreover the exported template you linked had "ServerConfigurationsManagementSettings" definition. This definition is nowhere to be found in the Github or documentation. – Max Mar 06 '17 at 14:39
  • That definition replaces "xSqlCreateVirtualDisk AddVirtualDisk" in the DSC, but when I deploy with that definition I also Russian keyboard language get installed on my server (wtf?). So I'm worry that Azure Automation doesn't export everything it does to the Image (Why were Microsoft guys use DSC extension in their Github examples?) and if I use SQL IaaS Extension I can't see what it does, something will not be deployed properly. Like it wouldn't add some vital piece or even will break something along the way. – Max Mar 06 '17 at 14:50

1 Answers1

0

Despite the fact that I don't know why are you doing this, I'll answer anyway.

Here's the link to my repo with the templates Azure is using to deploy SQL 2016. You can easily create one for yourself using the following procedure:

  1. Login to the portal, press "N"
  2. Search for "SQL 2016" and choose to deploy it
  3. Fill out all the fields
  4. Export the template

Export Template from the portal

As you can see from the template, they are using SQL IaaS extension to provision SQL. And you should probably do the same.

4c74356b41
  • 69,186
  • 6
  • 100
  • 141