If you have installed Hyper-V on Windows Server 2012 and while creating a VM get this error:
The server encountered an error while configuring the memory on Windows Server 2012.
Failed to modify device ‘Memory’.
Then most likely your antivirus program is scanning the virtual hard disk directory. Set an exclusion and you should then be allowed to finish configuring the memory in Hyper-V on Windows Server 2012.
Unless you’ve changed them, the default locations of the VHD files to exclude are:
- Default virtual hard disk storage location: C:\Users\Public\Documents\Hyper-V\Virtual Hard Disks
- Default virtual machine storage location: C:\ProgramData\Microsoft\Windows\Hyper-V
If you prefer to exclude virtual hard disks by file type, the file type is vhdx in Windows Server 2012