Skip to main content

azManagedImage

Use the resource azManagedImage to create a Managed Image for Virtual Machine deployment. If you need to create several virtual machines from a common template, this will create a base image. Remember to generalize and sysprep your drive before running this.

Attributes

AttributeTypeMandatoryValuesDefaultNotes
NameStringYes
ResourceGroupNameStringYes
LocationStringYes
OSTypeStringYesWindows, Linux
OSStateStringYesGeneralized, Specialized
SourceObjectYes

Source

AttributeTypeMandatoryValuesDefaultNotes
ResourceGroupNameStringYes
VMNameStringYes *Either VMName or SnapshotName must be supplied
SnapshotNameStringYes *Either VMName or SnapshotName must be supplied

Input by YAML

Object model for YAML deployment:

---
azManagedImage:
- Name: 'string'
ResourceGroupName: 'string'
Location: 'string'
OSType: 'string' # Windows, Linux
OSState: 'string' # Generalized, Specialized
Source:
ResourceGroupName: 'string'
VMName: 'string' # Source can be either VM or snapshot
SnapshotName: 'string' # Source can be either VM or snapshot

Input by JSON

Object model for JSON deployment:

{
"azManagedImage": [
{
"Name": "string",
"ResourceGroupName": "string",
"Location": "string",
"OSType": "string",
"OSState": "string",
"Source": {
"ResourceGroupName": "string",
"VMName": "string",
"SnapshotName": "string"
}
}
]
}