When you’re looking to create Azure virtual machines to install SQL Server, it’s best to do some pre-planning. Much like you wouldn’t install SQL Server by clicking Next, Next, Next on every installation screen, you won’t do that when creating a new VM on the Azure Portal, either. There are some basic settings you’ll need to know before you start. You’ll have to provide a VM name, and an admin username and password. You’ll need to know what region to create the VM in. (A basic walkthrough can be found here
.) However, for optimal performance with SQL Server, and interoperability of certain features, you’ll also need to dig a little deeper. Here are three settings to plan for.
- The “Pricing tier” is the size of the Azure virtual machine. This determines how many cores, how much memory, how many disks, and how many IOPS your VM will have. The minimum recommended size is an A2 Standard – 2 cores, 3.5 GB RAM, 4 disks. This may not be enough! Review the list of Azure VM sizes to determine what’s best for your application databases. When you need high I/O, choose your disks carefully. Some sizes only support 2 or 4 disks. If you need faster disks for more I/O, consider the Optimized Compute instances, which have SSDs and support more IOPS.
- Choose your virtual networking settings carefully. Within a region, there will be a virtual network, or v-net. A v-net can have multiple subnets – for example, an internal and a DMZ. Know which one you are putting your SQL Server into, and how that will affect application access. Some applications or features may not be able to communicate across different subnets. A VM’s subnet can be changed at a later point in time using the PowerShell Set-AzureSubnet command, but only to another subnet in the same v-net. It also requires restarting the VM, so this could interrupt service. Careful planning in the beginning will eliminate the need for this later.
- After creating your VM, you’ll only have one disk, even if the machine size can support more. You will need to go to the VM settings and attach new disks. Each disk can be up to 1 TB in size. After the disks have been attached, you’ll then need to connect to the VM, and in File & Storage Services create the storage pools. Then, you need to initialize and format the disk.
A little planning will go a long way towards a successful deployment of Azure Virtual Machines for use with SQL Server! As you set up your VMs, don’t forget to document your choices, too. This can help troubleshoot later problems, and help you as you create future VMs.