The error The specified device is not a valid physical disk device is caused when you have configured the ScratchConfig.ConfiguredScratchLocation setting to point to the base of your ESXi host's local storage and you have virtual machines running on the same local storage. This also occurs when you have the scratch partition on the base of the local storage and have put virtual machines in a sub-directory under the configured scratch partition. This is not supported with ESXi and any such virtual machine vmdk's are marked as insecure.
Note: This issue can occur on NFS storage where the scratch directory is the base directory of the datastore, and in the same directory as virtual machines directories, or virtual machine directories are in a subdirectory of the directory containing the scratch directory.