Deploying SQL Server on Azure VM with smaller data disk instead of the 1TB minimum
I thought I’d publish this little nugget of information as this seems to be a popular question and I have not seen many answers to this.
When you deploy an SQL server on a virtual machine in Azure using any of the published disk images on the Azure website, you are required to provision a data disk of 1TB or above for SQL. This is the recommended configuration by Microsoft to be able to provide the necessary IOPs to run SQL server in a production environment.
Disclaimer: If you choose to implement this, you do so at your own risk.
If you have a small database, provisioning a development or test SQL server and do not want to pay for the extra disk space (the costs do add up especially with premium disks), you can provision the server using a disk size that you specify by modifying the ARM template.
Select the SQL server with Windows server and run through the wizard as you normally would until you reach the last screen in the wizard prior to executing the deployment. However, click on “Download a template for automation” instead of creating the server.
You will be presented with the ARM template for the deployment in read-only mode . Click on the “Deploy” button.
Click on “Edit Parameters”.
Scroll down to the section on data disks where you will see the default of 1023 Gb per data disk.
Change this value to the size of the data disk you want provisioned. Here, I change the value to 256 Gb. Remember to save the template.
Enter the admin password for the VM (and SQL user) as your password won’t be saved. Accept the Terms and Conditions and click on “Purchase”.
It will take awhile for the VM to be provisioned. After it is provisioned, you can see that the data disk is provisioned with the size that you specified.
However, the Azure portal expects the first disk to be 1 TB and the SQL Virtual Machine configuration section will show it as being 1 TB.
You can still choose to use the Azure portal to extend the disk but the disk will be extended in 1TB increments.
As you can see below, Windows sees both disks as one logical disk.