When modifying the host file on an endpoint, the lines added or modified are removed on reboot.
Editing within the EDR managed block.
Make the changes to the hosts file outside the begin and end of the EDR managed block.
#BEGIN_CBEDR
#do not edit this block, it is controlled by VMware CB EDR.
x.x.x.x primary
x.x.x.x datastore
#END_CBEDR