Connect to the vCenter using the VMware vSphere Web Client and navigate to the ESXi host section.
Select Configuration > System > Advanced system settings, then click Edit. In the Edit advanced system settings dialog box that opens, change the value of the Misc.APDHandlingEnable parameter to 1.
Repeat the above steps to change the value of the Misc.APDHandlingEnable parameter to 1 for each ESXi host.
Select the cluster in vCenter and navigate to Configure > Service > vSphere availability. In the vSphere availability settings page, select Edit on the right side, then in the opened dialog box under the failure and response page, expand the data store in APD state and configure the following settings:
Click OK.