-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathCreateImageFromVHD.json
75 lines (75 loc) · 2.25 KB
/
CreateImageFromVHD.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
{
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"existingLabName": {
"type": "string",
"metadata": {
"description": "Name of an existing lab where the custom image will be created or updated."
}
},
"existingVhdUri": {
"type": "string",
"metadata": {
"description": "URI of an existing VHD from which the custom image will be created or updated."
}
},
"imageOsType": {
"type": "string",
"defaultValue": "Windows",
"allowedValues": [
"Linux",
"Windows"
],
"metadata": {
"description": "Specifies the OS type of the VHD. Currently 'Windows' and 'Linux' are the only supported values."
}
},
"isVhdSysPrepped": {
"type": "bool",
"defaultValue": false,
"metadata": {
"description": "If the existing VHD is a Windows VHD, then specifies whether the VHD is sysprepped (Note: If the existing VHD is NOT a Windows VHD, then please specify 'false')."
}
},
"imageName": {
"type": "string",
"metadata": {
"description": "Name of the custom image being created or updated."
}
},
"imageDescription": {
"type": "string",
"defaultValue": "",
"metadata": {
"description": "Details about the custom image being created or updated."
}
}
},
"variables": {
"resourceName": "[concat(parameters('existingLabName'), '/', parameters('imageName'))]",
"resourceType": "Microsoft.DevTestLab/labs/customimages"
},
"resources": [
{
"apiVersion": "2016-05-15",
"name": "[variables('resourceName')]",
"type": "Microsoft.DevTestLab/labs/customimages",
"properties": {
"author": "None",
"vhd": {
"imageName": "[parameters('existingVhdUri')]",
"sysPrep": "[parameters('isVhdSysPrepped')]",
"osType": "[parameters('imageOsType')]"
},
"description": "[parameters('imageDescription')]"
}
}
],
"outputs": {
"customImageId": {
"type": "string",
"value": "[resourceId(variables('resourceType'), parameters('existingLabName'), parameters('imageName'))]"
}
}
}