You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/virtual-machines/ephemeral-os-disks-deploy.md
+13-6Lines changed: 13 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,8 @@ In the Azure portal, you can choose to use ephemeral disks when deploying a virt
26
26
27
27
If the option for using an ephemeral disk or OS cache placement or Temp disk placement is greyed out, you might have selected a VM size that doesn't have a cache/temp size larger than the OS image or that doesn't support Premium storage. Go back to the **Basics** page and try choosing another VM size.
28
28
29
-
## Scale set template deployment
29
+
## Scale set template deployment
30
+
30
31
The process to create a scale set that uses an ephemeral OS disk is to add the `diffDiskSettings` property to the
31
32
`Microsoft.Compute/virtualMachineScaleSets/virtualMachineProfile` resource type in the template. Also, the caching policy must be set to `ReadOnly` for the ephemeral OS disk. placement can be changed to `CacheDisk` for OS cache disk placement.
32
33
@@ -55,10 +56,10 @@ The process to create a scale set that uses an ephemeral OS disk is to add the `
55
56
"createOption": "FromImage"
56
57
},
57
58
"imageReference": {
58
-
"publisher": "Canonical",
59
-
"offer": "UbuntuServer",
60
-
"sku": "16.04-LTS",
61
-
"version": "latest"
59
+
"publisher": "publisherName",
60
+
"offer": "offerName",
61
+
"sku": "skuName",
62
+
"version": "imageVersion"
62
63
}
63
64
},
64
65
"osProfile": {
@@ -71,6 +72,9 @@ The process to create a scale set that uses an ephemeral OS disk is to add the `
71
72
}
72
73
```
73
74
75
+
> [!NOTE]
76
+
> Replace all the other values accordingly.
77
+
74
78
## VM template deployment
75
79
You can deploy a VM with an ephemeral OS disk using a template. The process to create a VM that uses ephemeral OS disks is to add the `diffDiskSettings` property to Microsoft.Compute/virtualMachines resource type in the template. Also, the caching policy must be set to `ReadOnly` for the ephemeral OS disk. placement option can be changed to `CacheDisk` for OS cache disk placement.
76
80
@@ -117,14 +121,17 @@ To use an ephemeral disk for a CLI VM deployment, set the `--ephemeral-os-disk`
117
121
az vm create \
118
122
--resource-group myResourceGroup \
119
123
--name myVM \
120
-
--image UbuntuLTS \
124
+
--image imageName \
121
125
--ephemeral-os-disk true \
122
126
--ephemeral-os-disk-placement ResourceDisk \
123
127
--os-disk-caching ReadOnly \
124
128
--admin-username azureuser \
125
129
--generate-ssh-keys
126
130
```
127
131
132
+
> [!NOTE]
133
+
> Replace `myVM`, `myResourceGroup`, `imageName` and `azureuser` accordingly.
134
+
128
135
For scale sets, you use the same `--ephemeral-os-disk true` parameter for [az-vmss-create](/cli/azure/vmss#az-vmss-create) and set the `--os-disk-caching` parameter to `ReadOnly` and the `--ephemeral-os-disk-placement` parameter to `ResourceDisk` for temp disk placement or `CacheDisk` for cache disk placement.
0 commit comments