Microsoft.DevTestLab labs/customimages

Template format

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

{
  "name": "string",
  "type": "Microsoft.DevTestLab/labs/customimages",
  "apiVersion": "2018-09-15",
  "location": "string",
  "tags": {},
  "properties": {
    "vm": {
      "sourceVmId": "string",
      "windowsOsInfo": {
        "windowsOsState": "string"
      },
      "linuxOsInfo": {
        "linuxOsState": "string"
      }
    },
    "vhd": {
      "imageName": "string",
      "sysPrep": "boolean",
      "osType": "string"
    },
    "description": "string",
    "author": "string",
    "managedImageId": "string",
    "managedSnapshotId": "string",
    "dataDiskStorageInfo": [
      {
        "lun": "string",
        "storageType": "string"
      }
    ],
    "customImagePlan": {
      "id": "string",
      "publisher": "string",
      "offer": "string"
    },
    "isPlanAuthorized": "boolean"
  }
}

Property values

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

Microsoft.DevTestLab/labs/customimages object

Name Type Required Value
name string Yes The name of the custom image.
type enum Yes customimages
-or-
Microsoft.DevTestLab/labs/customimages

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. - CustomImageProperties object

CustomImageProperties object

Name Type Required Value
vm object No The virtual machine from which the image is to be created. - CustomImagePropertiesFromVm object
vhd object No The VHD from which the image is to be created. - CustomImagePropertiesCustom object
description string No The description of the custom image.
author string No The author of the custom image.
managedImageId string No The Managed Image Id backing the custom image.
managedSnapshotId string No The Managed Snapshot Id backing the custom image.
dataDiskStorageInfo array No Storage information about the data disks present in the custom image - DataDiskStorageTypeInfo object
customImagePlan object No Storage information about the plan related to this custom image - CustomImagePropertiesFromPlan object
isPlanAuthorized boolean No Whether or not the custom images underlying offer/plan has been enabled for programmatic deployment

CustomImagePropertiesFromVm object

Name Type Required Value
sourceVmId string No The source vm identifier.
windowsOsInfo object No The Windows OS information of the VM. - WindowsOsInfo object
linuxOsInfo object No The Linux OS information of the VM. - LinuxOsInfo object

CustomImagePropertiesCustom object

Name Type Required Value
imageName string No The image name.
sysPrep boolean No Indicates whether sysprep has been run on the VHD.
osType enum Yes The OS type of the custom image (i.e. Windows, Linux). - Windows, Linux, None

DataDiskStorageTypeInfo object

Name Type Required Value
lun string No Disk Lun
storageType enum No Disk Storage Type. - Standard, Premium, StandardSSD

CustomImagePropertiesFromPlan object

Name Type Required Value
id string No The id of the plan, equivalent to name of the plan
publisher string No The publisher for the plan from the marketplace image the custom image is derived from
offer string No The offer for the plan from the marketplace image the custom image is derived from

WindowsOsInfo object

Name Type Required Value
windowsOsState enum No The state of the Windows OS (i.e. NonSysprepped, SysprepRequested, SysprepApplied). - NonSysprepped, SysprepRequested, SysprepApplied

LinuxOsInfo object

Name Type Required Value
linuxOsState enum No The state of the Linux OS (i.e. NonDeprovisioned, DeprovisionRequested, DeprovisionApplied). - NonDeprovisioned, DeprovisionRequested, DeprovisionApplied