Microsoft.DevTestLab labs/virtualmachines 2018-09-15

Template format

To create a Microsoft.DevTestLab/labs/virtualmachines resource, add the following JSON to the resources section of your template.

{
  "name": "string",
  "type": "Microsoft.DevTestLab/labs/virtualmachines",
  "apiVersion": "2018-09-15",
  "location": "string",
  "tags": {},
  "properties": {
    "notes": "string",
    "ownerObjectId": "string",
    "ownerUserPrincipalName": "string",
    "computeId": "string",
    "customImageId": "string",
    "osType": "string",
    "size": "string",
    "userName": "string",
    "password": "string",
    "sshKey": "string",
    "isAuthenticationWithSshKey": "boolean",
    "fqdn": "string",
    "labSubnetName": "string",
    "labVirtualNetworkId": "string",
    "disallowPublicIpAddress": "boolean",
    "artifacts": [
      {
        "artifactId": "string",
        "artifactTitle": "string",
        "parameters": [
          {
            "name": "string",
            "value": "string"
          }
        ],
        "status": "string",
        "deploymentStatusMessage": "string",
        "vmExtensionStatusMessage": "string",
        "installTime": "string"
      }
    ],
    "artifactDeploymentStatus": {
      "deploymentStatus": "string",
      "artifactsApplied": "integer",
      "totalArtifacts": "integer"
    },
    "galleryImageReference": {
      "offer": "string",
      "publisher": "string",
      "sku": "string",
      "osType": "string",
      "version": "string"
    },
    "planId": "string",
    "networkInterface": {
      "virtualNetworkId": "string",
      "subnetId": "string",
      "publicIpAddressId": "string",
      "publicIpAddress": "string",
      "privateIpAddress": "string",
      "dnsName": "string",
      "rdpAuthority": "string",
      "sshAuthority": "string",
      "sharedPublicIpAddressConfiguration": {
        "inboundNatRules": [
          {
            "transportProtocol": "string",
            "frontendPort": "integer",
            "backendPort": "integer"
          }
        ]
      }
    },
    "expirationDate": "string",
    "allowClaim": "boolean",
    "storageType": "string",
    "virtualMachineCreationSource": "string",
    "environmentId": "string",
    "dataDiskParameters": [
      {
        "attachNewDataDiskOptions": {
          "diskSizeGiB": "integer",
          "diskName": "string",
          "diskType": "string"
        },
        "existingLabDiskId": "string",
        "hostCaching": "string"
      }
    ],
    "scheduleParameters": [
      {
        "properties": {
          "status": "string",
          "taskType": "string",
          "weeklyRecurrence": {
            "weekdays": [
              "string"
            ],
            "time": "string"
          },
          "dailyRecurrence": {
            "time": "string"
          },
          "hourlyRecurrence": {
            "minute": "integer"
          },
          "timeZoneId": "string",
          "notificationSettings": {
            "status": "string",
            "timeInMinutes": "integer",
            "webhookUrl": "string",
            "emailRecipient": "string",
            "notificationLocale": "string"
          },
          "targetResourceId": "string"
        },
        "name": "string",
        "location": "string",
        "tags": {}
      }
    ],
    "lastKnownPowerState": "string"
  },
  "resources": []
}

Property values

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

Microsoft.DevTestLab/labs/virtualmachines object

Name Type Required Value
name string Yes The name of the virtual machine.
type enum Yes virtualmachines
-or-
Microsoft.DevTestLab/labs/virtualmachines

See Set name and type for child resources.
apiVersion enum Yes 2018-09-15
location string No The location of the resource.
tags object No The tags of the resource.
properties object Yes The properties of the resource. - LabVirtualMachineProperties object
resources array No schedules

LabVirtualMachineProperties object

Name Type Required Value
notes string No The notes of the virtual machine.
ownerObjectId string No The object identifier of the owner of the virtual machine.
ownerUserPrincipalName string No The user principal name of the virtual machine owner.
computeId string No The resource identifier (Microsoft.Compute) of the virtual machine.
customImageId string No The custom image identifier of the virtual machine.
osType string No The OS type of the virtual machine.
size string No The size of the virtual machine.
userName string No The user name of the virtual machine.
password string No The password of the virtual machine administrator.
sshKey string No The SSH key of the virtual machine administrator.
isAuthenticationWithSshKey boolean No Indicates whether this virtual machine uses an SSH key for authentication.
fqdn string No The fully-qualified domain name of the virtual machine.
labSubnetName string No The lab subnet name of the virtual machine.
labVirtualNetworkId string No The lab virtual network identifier of the virtual machine.
disallowPublicIpAddress boolean No Indicates whether the virtual machine is to be created without a public IP address.
artifacts array No The artifacts to be installed on the virtual machine. - ArtifactInstallProperties object
artifactDeploymentStatus object No The artifact deployment status for the virtual machine. - ArtifactDeploymentStatusProperties object
galleryImageReference object No The Microsoft Azure Marketplace image reference of the virtual machine. - GalleryImageReference object
planId string No The id of the plan associated with the virtual machine image
networkInterface object No The network interface properties. - NetworkInterfaceProperties object
expirationDate string No The expiration date for VM.
allowClaim boolean No Indicates whether another user can take ownership of the virtual machine
storageType string No Storage type to use for virtual machine (i.e. Standard, Premium).
virtualMachineCreationSource enum No Tells source of creation of lab virtual machine. Output property only. - FromCustomImage, FromGalleryImage, FromSharedGalleryImage
environmentId string No The resource ID of the environment that contains this virtual machine, if any.
dataDiskParameters array No New or existing data disks to attach to the virtual machine after creation - DataDiskProperties object
scheduleParameters array No Virtual Machine schedules to be created - ScheduleCreationParameter object
lastKnownPowerState string No Last known compute power state captured in DTL

ArtifactInstallProperties object

Name Type Required Value
artifactId string No The artifact's identifier.
artifactTitle string No The artifact's title.
parameters array No The parameters of the artifact. - ArtifactParameterProperties object
status string No The status of the artifact.
deploymentStatusMessage string No The status message from the deployment.
vmExtensionStatusMessage string No The status message from the virtual machine extension.
installTime string No The time that the artifact starts to install on the virtual machine.

ArtifactDeploymentStatusProperties object

Name Type Required Value
deploymentStatus string No The deployment status of the artifact.
artifactsApplied integer No The total count of the artifacts that were successfully applied.
totalArtifacts integer No The total count of the artifacts that were tentatively applied.

GalleryImageReference object

Name Type Required Value
offer string No The offer of the gallery image.
publisher string No The publisher of the gallery image.
sku string No The SKU of the gallery image.
osType string No The OS type of the gallery image.
version string No The version of the gallery image.

NetworkInterfaceProperties object

Name Type Required Value
virtualNetworkId string No The resource ID of the virtual network.
subnetId string No The resource ID of the sub net.
publicIpAddressId string No The resource ID of the public IP address.
publicIpAddress string No The public IP address.
privateIpAddress string No The private IP address.
dnsName string No The DNS name.
rdpAuthority string No The RdpAuthority property is a server DNS host name or IP address followed by the service port number for RDP (Remote Desktop Protocol).
sshAuthority string No The SshAuthority property is a server DNS host name or IP address followed by the service port number for SSH.
sharedPublicIpAddressConfiguration object No The configuration for sharing a public IP address across multiple virtual machines. - SharedPublicIpAddressConfiguration object

DataDiskProperties object

Name Type Required Value
attachNewDataDiskOptions object No Specifies options to attach a new disk to the virtual machine. - AttachNewDataDiskOptions object
existingLabDiskId string No Specifies the existing lab disk id to attach to virtual machine.
hostCaching enum No Caching option for a data disk (i.e. None, ReadOnly, ReadWrite). - None, ReadOnly, ReadWrite

ScheduleCreationParameter object

Name Type Required Value
properties object No The properties of the schedule. - ScheduleCreationParameterProperties object
name string No The name of the virtual machine or environment
location string No The location of the new virtual machine or environment
tags object No The tags of the resource.

ArtifactParameterProperties object

Name Type Required Value
name string No The name of the artifact parameter.
value string No The value of the artifact parameter.

SharedPublicIpAddressConfiguration object

Name Type Required Value
inboundNatRules array No The incoming NAT rules - InboundNatRule object

AttachNewDataDiskOptions object

Name Type Required Value
diskSizeGiB integer No Size of the disk to be attached in GibiBytes.
diskName string No The name of the disk to be attached.
diskType enum No The storage type for the disk (i.e. Standard, Premium). - Standard, Premium, StandardSSD

ScheduleCreationParameterProperties object

Name Type Required Value
status enum No The status of the schedule (i.e. Enabled, Disabled). - Enabled or Disabled
taskType string No The task type of the schedule (e.g. LabVmsShutdownTask, LabVmAutoStart).
weeklyRecurrence object No If the schedule will occur only some days of the week, specify the weekly recurrence. - WeekDetails object
dailyRecurrence object No If the schedule will occur once each day of the week, specify the daily recurrence. - DayDetails object
hourlyRecurrence object No If the schedule will occur multiple times a day, specify the hourly recurrence. - HourDetails object
timeZoneId string No The time zone ID (e.g. Pacific Standard time).
notificationSettings object No Notification settings. - NotificationSettings object
targetResourceId string No The resource ID to which the schedule belongs

InboundNatRule object

Name Type Required Value
transportProtocol enum No The transport protocol for the endpoint. - Tcp or Udp
frontendPort integer No The external endpoint port of the inbound connection. Possible values range between 1 and 65535, inclusive. If unspecified, a value will be allocated automatically.
backendPort integer No The port to which the external traffic will be redirected.

WeekDetails object

Name Type Required Value
weekdays array No The days of the week for which the schedule is set (e.g. Sunday, Monday, Tuesday, etc.). - string
time string No The time of the day the schedule will occur.

DayDetails object

Name Type Required Value
time string No The time of day the schedule will occur.

HourDetails object

Name Type Required Value
minute integer No Minutes of the hour the schedule will run.

NotificationSettings object

Name Type Required Value
status enum No If notifications are enabled for this schedule (i.e. Enabled, Disabled). - Enabled or Disabled
timeInMinutes integer No Time in minutes before event at which notification will be sent.
webhookUrl string No The webhook URL to which the notification will be sent.
emailRecipient string No The email recipient to send notifications to (can be a list of semi-colon separated email addresses).
notificationLocale string No The locale to use when sending a notification (fallback for unsupported languages is EN).

Quickstart templates

The following quickstart templates deploy this resource type.

Template Description
Creates a lab in Azure DevTest Labs with a Windows Server VM

Deploy to Azure
This template creates a new DevTest Lab / DTL instance with a Windows Server 2019 Datacenter VM in it. More Azure Resource Manager Quickstart Templates for Azure DevTest Labs available at https://github.com/Azure/azure-devtestlab/tree/master/ARMTemplates