When migrating storage using the Move-VM command, an "Unable to access file" error occurs.
PS C:\Users\Administrator> Move-VM -vm [VM Name] -DataStore [Datastore name] -DiskStorageFormat EagerZeroedThick
Move-VM : YYYY/MM/DD HH:MM:SS Move-VM The operation for the entity "[VM name]" failed with the following message: "Unab
le to access the virtual machine configuration: Unable to access file [Datastore name]"
PowerCLI 12.x.x
ESXi 7.x
vCenter Server 7.x
The error occurs because the ESXi host where the target virtual machine is registered cannot access the specified datastore.
Enable access to the specified datastore on the ESXi host where the target virtual machine is registered.
Ref. Performing a rescan of the storage on an ESXi host