We have detected that on ESXi 7.0.0 build-15843807 -flat.vmdk files are locked for reading even though the VM is running on top of a snapshot.
[root@wxpmk:~] cat /vmfs/volumes/data/CentOS-7.2/CentOS-7.2.vmsd
.encoding = "UTF-8"
snapshot.lastUID = "13"
snapshot.current = "13"
snapshot0.uid = "13"
snapshot0.filename = "CentOS-7.2-Snapshot13.vmsn"
snapshot0.displayName = "1"
snapshot0.createTimeHigh = "369657"
snapshot0.createTimeLow = "387876330"
snapshot0.numDisks = "1"
snapshot0.disk0.fileName = "CentOS-7.2.vmdk"
snapshot0.disk0.node = "scsi0:0"
snapshot.numSnapshots = "1"
[root@wxpmk:~] dd if=/vmfs/volumes/data/CentOS-7.2/CentOS-7.2-flat.vmdk ibs=1 skip=0 count=1
dd: can't open '/vmfs/volumes/data/CentOS-7.2/CentOS-7.2-flat.vmdk': Device or resource busy
Nonetheless when we query the file lock info, the file appears as: lockMode: Read-Only
vmfsfilelockinfo -p /vmfs/volumes/data/CentOS-7.2/CentOS-7.2-flat.vmdk
vmfsfilelockinfo Version 2.0
Looking for lock owners on "CentOS-7.2-flat.vmdk"
"CentOS-7.2-flat.vmdk" is locked in Read-Only mode by host having mac address ['00:0c:29:d5:ea:36']
Trying to use information from VMFS Heartbeat
Host owning the lock on file is 192.168.3.240, lockMode : Read-Only
Total time taken : 4.1909195680054836 seconds.
We don't know if this is the intended behaviour or it is a bug, as there seems to be some contradictions in what we could find out so far.