During the provisioning of a new Hyper-V virtual machine in Windows Server 2016 (or 2012 R2), you may encounter a rather baffling error while executing the New-VM cmdlet:
New-VM : The operation failed. User ‘Administrator’ failed to create external configuration store at ‘C:\vm\dc01’: The system cannot find the path specified.. (0x80070003) The operation failed because the file was not found.
You confirm receiving a similar message with the “New Virtual Machine Wizard” in Hyper-V Manager and that the user account has sufficient rights/permissions to create a new VM in the target directory.
This strange error could be attributed to a corrupted or missing “Virtual Machines” folder and/or content. This is located at “C:\ProgramData\Microsoft\Windows\Hyper-V” with a typical Hyper-V installation. To resolve this issue, recreate or restore the former’s contents from a working backup. Alternatively, uninstall and reinstall of the Hyper-V role may be in order. Note that this location contains .xml data setup as symbolic links (.symlink) to Hyper-V virtual machines.