Host profile apply failed with error: Cannot remove datastore '<datastore-name>' because "One or more virtual machines are still registered on it". Correct the problem and retry the operation.
/var/run/log/vmkernel.log snippets reports similar to:WARNING: NFS: 3113: <datastore-name> has open files, cannot be unmounted.
When a storage-related settings in the Host Profile (like a multipathing policy, NFS version, mount option, mount point name, or even a custom attribute) needs to be changed, vSphere treats that as a significant config update. To apply the changes safely, the host unmounts that datastore, applies the updated configuration and remounts the datastore.
If the datastore is being used by the virtual machines running on the host or the host itself (as heartbeat datastore), the unmount operation fails as the datastore is being used.