// Module included in the following assemblies:
//
// * machine_management/creating_machinesets/creating-machineset-azure.adoc

:_mod-docs-content-type: PROCEDURE
[id="machineset-creating-azure-ephemeral-os_{context}"]
= Creating machines on Ephemeral OS disks by using compute machine sets

[role="_abstract"]
To improve performance and reduce storage costs, you can host the OS disk directly on the local storage of the virtual machines (VMs) rather than on remote {azure-first} Storage.

You launch machines on Ephemeral OS disks on {azure-short} by editing your compute machine set YAML file.

.Prerequisites

* Have an existing {azure-short} cluster.

.Procedure

. Edit the custom resource (CR) by running the following command:
+
[source,terminal]
----
$ oc edit machineset <machine-set-name>
----
+
where `<machine-set-name>` is the compute machine set that you want to provision machines on Ephemeral OS disks.

. Add the following to the `providerSpec` field:
+
[source,yaml]
----
providerSpec:
  value:
    ...
    osDisk:
       ...
       diskSettings:
         ephemeralStorageLocation: Local
       cachingType: ReadOnly
       managedDisk:
         storageAccountType: Standard_LRS
       ...
----
+
where:
+
`providerSpec.value.osDisk.diskSettings`, `providerSpec.value.osDisk.diskSettings.ephemeralStorageLocation`, and `providerSpec.value.osDisk.cachingType`:: Enables the use of Ephemeral OS disks.
`providerSpec.value.osDisk.managedDisk.storageAccountType`:: Ephemeral OS disks are only supported for VMs or scale set instances that use the Standard LRS storage account type.
+
[IMPORTANT]
====
The implementation of Ephemeral OS disk support in {product-title} only supports the `CacheDisk` placement type. Do not change the `placement` configuration setting.
====
. Create a compute machine set using the updated configuration:
+
[source,terminal]
----
$ oc create -f <machine-set-config>.yaml
----

.Verification

* On the {azure-short} portal, review the *Overview* page for a machine deployed by the compute machine set, and verify that the `Ephemeral OS disk` field is set to `OS cache placement`.
