In azure sql virtual machine deployment can we use specific (additional) disk for SQL installation

Stalin Rayala (External) 0 Reputation points
2024-12-24T10:55:57.69+00:00

In azure sql virtual machine deployment can we use separate (additional) managed disk for SQL installation instead of the C drive or OS drive

SQL Server on Azure Virtual Machines
0 comments No comments
{count} votes

Accepted answer
  1. Erland Sommarskog 114.6K Reputation points MVP
    2024-12-26T10:19:00.6733333+00:00

    Actually, My SQL Admin told me that this is the ideal best practice to install the SQL on separate drive (even the installation along with the DB, Log & TempDB) in On-Prem.......so checking.

    The normal way to install SQL Server on an Azure VM is to use on of the SQL Azure VM images, and as far as I know, they come with the SQL Server binaries installed in C:\Program Files\Microsoft SQL Server. You cannot override this when you create VM through the portal. It might be overrirdable if you create the VM through ARM, Bicep or PowerShell, but I would not really expect so.

    Thus, to change that you would have to uninstall SQL Server and re-install. Or you would have to take a non-SQL Server image and install SQL Server on it.

    In both cases, you are likely to add extra complexity which may come back and bite you later. If Microsoft creates their Azure SQL VMs with the binaries on C, they probably consider that a good practice.

    And, myself, VM or on-prem, I can't see much reason to have the binaries than in the usual place in C:\Program Files. The Data and Log directories are another matter. For a production server, you don't want any database files on the OS-Disk.

    2 people found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. NIKHILA NETHIKUNTA 4,005 Reputation points Microsoft Vendor
    2024-12-24T13:11:09.57+00:00

    @Stalin Rayala (External)
    Thank you for posting the question and for using Microsoft Q&A platform.

    Yes, you can use a separate managed disk for SQL installation instead of the C drive or OS drive in Azure SQL virtual machine deployment. This is actually a best practice recommended by Microsoft.

    When you create a virtual machine in Azure, you can attach one or more data disks to the virtual machine. These disks can be used to store data files, log files, and backup files for SQL Server. By using separate disks for SQL Server data and log files, you can improve performance and simplify management.

    There are also three main disk roles to consider for your SQL Server on Azure VM - an OS disk, a temporary disk, and your data disks. Carefully choose what is stored on the operating system drive (C:) and the ephemeral temporary drive (D:).
    https://docs.azure.cn/en-us/azure-sql/virtual-machines/windows/performance-guidelines-best-practices-storage#vm-disk-types

    1. An operating system disk is a VHD that can be booted and mounted as a running version of an operating system and is labeled as the C:\ drive. When you create an Azure VM, the platform attaches at least one disk to the VM for the operating system disk. The C:\ drive is the default location for application installs and file configuration.
    2. Many Azure VMs contain another disk type called the temporary disk (labeled as the D:\ drive). Depending on the VM series and size the capacity of this disk will vary.
    3. Data disks are remote storage disks that are often created in storage pools in order to exceed the capacity and performance that any single disk could offer to the VM.
    4. Use Premium SSDs for data and log files for production SQL Server workloads. Premium SSD IOPS and bandwidth vary based on the disk size and type.

    For more information, please refer to the below links:

    https://docs.azure.cn/en-us/azure-sql/virtual-machines/windows/performance-guidelines-best-practices-storage#vm-disk-types
    https://learn.microsoft.com/en-us/azure/azure-sql/virtual-machines/windows/storage-configuration?view=azuresql&tabs=windows2016
    https://www.sqlservercentral.com/forums/topic/proper-disk-drive-configuration-when-you-using-azure-sql-server-vms

    Hope this helps. Do let us know if you have any further queries.


    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.