The disk in question is not locked for read/write by the host operating system in any way. The createrawvmdk command was run as Administrator and the virtual machine was also started as Administrator. If I turn on "Use Host I/O Cache" the error does not appear but the guest OS hangs. It is as if the disk is being used in read-only mode, even though Diskpart says it isn't.The I/O cache encountered an error while updating data in medium "ahci-0-0" (rc=VERR_ACCESS_DENIED). Make sure there is enough free space on the disk and that the disk is working properly. Operation can be resumed afterwards.
Error ID: BLKCACHE_IOERR
Severity: Non-Fatal Error
Host machine is running Windows 10 64-bit. Various Windows and Linux guests are all affected. VirtualBox version 5.2.6 and 5.1.32 both encountered this error.
EDIT: version 5.2.7 build 120865 also doesn't work.