Microsoft.SqlVirtualMachine sqlVirtualMachines template reference

Template format

To create a Microsoft.SqlVirtualMachine/sqlVirtualMachines resource, add the following JSON to the resources section of your template.

{
  "name": "string",
  "type": "Microsoft.SqlVirtualMachine/sqlVirtualMachines",
  "apiVersion": "2017-03-01-preview",
  "location": "string",
  "tags": {},
  "identity": {
    "type": "SystemAssigned"
  },
  "properties": {
    "virtualMachineResourceId": "string",
    "sqlImageOffer": "string",
    "sqlServerLicenseType": "string",
    "sqlManagement": "string",
    "sqlImageSku": "string",
    "sqlVirtualMachineGroupResourceId": "string",
    "wsfcDomainCredentials": {
      "clusterBootstrapAccountPassword": "string",
      "clusterOperatorAccountPassword": "string",
      "sqlServiceAccountPassword": "string"
    },
    "autoPatchingSettings": {
      "enable": "boolean",
      "dayOfWeek": "string",
      "maintenanceWindowStartingHour": "integer",
      "maintenanceWindowDuration": "integer"
    },
    "autoBackupSettings": {
      "enable": "boolean",
      "enableEncryption": "boolean",
      "retentionPeriod": "integer",
      "storageAccountUrl": "string",
      "storageAccessKey": "string",
      "password": "string",
      "backupSystemDbs": "boolean",
      "backupScheduleType": "string",
      "fullBackupFrequency": "string",
      "fullBackupStartTime": "integer",
      "fullBackupWindowHours": "integer",
      "logBackupFrequency": "integer"
    },
    "keyVaultCredentialSettings": {
      "enable": "boolean",
      "credentialName": "string",
      "azureKeyVaultUrl": "string",
      "servicePrincipalName": "string",
      "servicePrincipalSecret": "string"
    },
    "serverConfigurationsManagementSettings": {
      "sqlConnectivityUpdateSettings": {
        "connectivityType": "string",
        "port": "integer",
        "sqlAuthUpdateUserName": "string",
        "sqlAuthUpdatePassword": "string"
      },
      "sqlWorkloadTypeUpdateSettings": {
        "sqlWorkloadType": "string"
      },
      "sqlStorageUpdateSettings": {
        "diskCount": "integer",
        "startingDeviceId": "integer",
        "diskConfigurationType": "string"
      },
      "additionalFeaturesServerConfigurations": {
        "isRServicesEnabled": "boolean"
      }
    },
    "storageConfigurationSettings": {
      "sqlDataSettings": {
        "luns": [
          "integer"
        ],
        "defaultFilePath": "string"
      },
      "sqlLogSettings": {
        "luns": [
          "integer"
        ],
        "defaultFilePath": "string"
      },
      "sqlTempDbSettings": {
        "luns": [
          "integer"
        ],
        "defaultFilePath": "string"
      },
      "diskConfigurationType": "string",
      "storageWorkloadType": "string"
    }
  }
}

Property values

The following tables describe the values you need to set in the schema.

Microsoft.SqlVirtualMachine/sqlVirtualMachines object

Name Type Required Value
name string Yes Name of the SQL virtual machine.
type enum Yes Microsoft.SqlVirtualMachine/sqlVirtualMachines
apiVersion enum Yes 2017-03-01-preview
location string Yes Resource location.
tags object No Resource tags.
identity object No Azure Active Directory identity of the server. - ResourceIdentity object
properties object Yes Resource properties. - SqlVirtualMachineProperties object

ResourceIdentity object

Name Type Required Value
type enum No The identity type. Set this to 'SystemAssigned' in order to automatically create and assign an Azure Active Directory principal for the resource. - SystemAssigned

SqlVirtualMachineProperties object

Name Type Required Value
virtualMachineResourceId string No ARM Resource id of underlying virtual machine created from SQL marketplace image.
sqlImageOffer string No SQL image offer. Examples include SQL2016-WS2016, SQL2017-WS2016.
sqlServerLicenseType enum No SQL Server license type. - PAYG or AHUB
sqlManagement enum No SQL Server Management type. - Full, LightWeight, NoAgent
sqlImageSku enum No SQL Server edition type. - Developer, Express, Standard, Enterprise, Web
sqlVirtualMachineGroupResourceId string No ARM resource id of the SQL virtual machine group this SQL virtual machine is or will be part of.
wsfcDomainCredentials object No Domain credentials for setting up Windows Server Failover Cluster for SQL availability group. - WsfcDomainCredentials object
autoPatchingSettings object No Auto patching settings for applying critical security updates to SQL virtual machine. - AutoPatchingSettings object
autoBackupSettings object No Auto backup settings for SQL Server. - AutoBackupSettings object
keyVaultCredentialSettings object No Key vault credential settings. - KeyVaultCredentialSettings object
serverConfigurationsManagementSettings object No SQL Server configuration management settings. - ServerConfigurationsManagementSettings object
storageConfigurationSettings object No Storage Configuration Settings. - StorageConfigurationSettings object

WsfcDomainCredentials object

Name Type Required Value
clusterBootstrapAccountPassword string No Cluster bootstrap account password.
clusterOperatorAccountPassword string No Cluster operator account password.
sqlServiceAccountPassword string No SQL service account password.

AutoPatchingSettings object

Name Type Required Value
enable boolean No Enable or disable autopatching on SQL virtual machine.
dayOfWeek enum No Day of week to apply the patch on. - Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday
maintenanceWindowStartingHour integer No Hour of the day when patching is initiated. Local VM time.
maintenanceWindowDuration integer No Duration of patching.

AutoBackupSettings object

Name Type Required Value
enable boolean No Enable or disable autobackup on SQL virtual machine.
enableEncryption boolean No Enable or disable encryption for backup on SQL virtual machine.
retentionPeriod integer No Retention period of backup: 1-30 days.
storageAccountUrl string No Storage account url where backup will be taken to.
storageAccessKey string No Storage account key where backup will be taken to.
password string No Password for encryption on backup.
backupSystemDbs boolean No Include or exclude system databases from auto backup.
backupScheduleType enum No Backup schedule type. - Manual or Automated
fullBackupFrequency enum No Frequency of full backups. In both cases, full backups begin during the next scheduled time window. - Daily or Weekly
fullBackupStartTime integer No Start time of a given day during which full backups can take place. 0-23 hours.
fullBackupWindowHours integer No Duration of the time window of a given day during which full backups can take place. 1-23 hours.
logBackupFrequency integer No Frequency of log backups. 5-60 minutes.

KeyVaultCredentialSettings object

Name Type Required Value
enable boolean No Enable or disable key vault credential setting.
credentialName string No Credential name.
azureKeyVaultUrl string No Azure Key Vault url.
servicePrincipalName string No Service principal name to access key vault.
servicePrincipalSecret string No Service principal name secret to access key vault.

ServerConfigurationsManagementSettings object

Name Type Required Value
sqlConnectivityUpdateSettings object No SQL connectivity type settings. - SqlConnectivityUpdateSettings object
sqlWorkloadTypeUpdateSettings object No SQL workload type settings. - SqlWorkloadTypeUpdateSettings object
sqlStorageUpdateSettings object No SQL storage update settings. - SqlStorageUpdateSettings object
additionalFeaturesServerConfigurations object No Additional SQL feature settings. - AdditionalFeaturesServerConfigurations object

StorageConfigurationSettings object

Name Type Required Value
sqlDataSettings object No SQL Server Data Storage Settings. - SQLStorageSettings object
sqlLogSettings object No SQL Server Log Storage Settings. - SQLStorageSettings object
sqlTempDbSettings object No SQL Server TempDb Storage Settings. - SQLStorageSettings object
diskConfigurationType enum No Disk configuration to apply to SQL Server. - NEW, EXTEND, ADD
storageWorkloadType enum No Storage workload type. - GENERAL, OLTP, DW

SqlConnectivityUpdateSettings object

Name Type Required Value
connectivityType enum No SQL Server connectivity option. - LOCAL, PRIVATE, PUBLIC
port integer No SQL Server port.
sqlAuthUpdateUserName string No SQL Server sysadmin login to create.
sqlAuthUpdatePassword string No SQL Server sysadmin login password.

SqlWorkloadTypeUpdateSettings object

Name Type Required Value
sqlWorkloadType enum No SQL Server workload type. - GENERAL, OLTP, DW

SqlStorageUpdateSettings object

Name Type Required Value
diskCount integer No Virtual machine disk count.
startingDeviceId integer No Device id of the first disk to be updated.
diskConfigurationType enum No Disk configuration to apply to SQL Server. - NEW, EXTEND, ADD

AdditionalFeaturesServerConfigurations object

Name Type Required Value
isRServicesEnabled boolean No Enable or disable R services (SQL 2016 onwards).

SQLStorageSettings object

Name Type Required Value
luns array No Logical Unit Numbers for the disks. - integer
defaultFilePath string No SQL Server default file path

Quickstart templates

The following quickstart templates deploy this resource type.