The Storage DRS rules that you define at the virtual machine level function in the same way as the affinity and anti-affinity rules that you define at the datastore cluster level. Virtual machine Storage DRS rules define whether virtual machine hard disks are placed and kept on the same datastore or on different datastores within a datastore cluster. You can also create Storage DRS rules that place and keep all virtual disks of certain virtual machines on different datastores within a datastore cluster.
In the vSphere Client, you can create, edit, and delete Storage DRS rules.
VMDK Affinity Rules
By default, all virtual machine hard disks are kept together on the same datastore within a datastore cluster that has Storage DRS enabled. That is, VMDK affinity rules are enabled by default for all virtual machines that are in a datastore cluster. You can override that rule for the datastore cluster or for individual virtual machines.
Storage DRS Anti-Affinity Rules
- VMDK anti-affinity rules ensure that two or more virtual hard disks of a single virtual machine are placed and kept on different datastores within the datastore cluster.
- VM anti-affinity rules ensure that all the virtual hard disks of two or more virtual machines are placed and kept on different datastores within the datastore cluster.
For more information about Storage DRS, see the vSphere Resource Management documentaion.