Skip to content

Commit ab70904

Browse files
Merge pull request #232269 from divargas-msft/patch-5
[Doc-a-thon] Update ephemeral-os-disks-deploy
2 parents bab8ada + 2278b6c commit ab70904

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

articles/virtual-machines/ephemeral-os-disks-deploy.md

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ In the Azure portal, you can choose to use ephemeral disks when deploying a virt
2626

2727
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.
2828

29-
## Scale set template deployment
29+
## Scale set template deployment
30+
3031
The process to create a scale set that uses an ephemeral OS disk is to add the `diffDiskSettings` property to the
3132
`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.
3233

@@ -55,10 +56,10 @@ The process to create a scale set that uses an ephemeral OS disk is to add the `
5556
"createOption": "FromImage"
5657
},
5758
"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"
6263
}
6364
},
6465
"osProfile": {
@@ -71,6 +72,9 @@ The process to create a scale set that uses an ephemeral OS disk is to add the `
7172
}
7273
```
7374

75+
> [!NOTE]
76+
> Replace all the other values accordingly.
77+
7478
## VM template deployment
7579
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.
7680

@@ -117,14 +121,17 @@ To use an ephemeral disk for a CLI VM deployment, set the `--ephemeral-os-disk`
117121
az vm create \
118122
--resource-group myResourceGroup \
119123
--name myVM \
120-
--image UbuntuLTS \
124+
--image imageName \
121125
--ephemeral-os-disk true \
122126
--ephemeral-os-disk-placement ResourceDisk \
123127
--os-disk-caching ReadOnly \
124128
--admin-username azureuser \
125129
--generate-ssh-keys
126130
```
127131

132+
> [!NOTE]
133+
> Replace `myVM`, `myResourceGroup`, `imageName` and `azureuser` accordingly.
134+
128135
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.
129136

130137
## Reimage a VM using REST

0 commit comments

Comments
 (0)