A paging file creates virtual RAM, allowing the OS to “page out” inactive memory and “page in” memory from the file when it is required. This allows the OS to make better use of the available RAM in a computer.
Hyper-V has little use for a paging file. Unlike certain hypervisors, Hyper-V does not do blind second level paging. That’s because Hyper-V’s Dynamic Memory works differently to other memory techniques. That’s a whole other blog post. But long story short: the paging file in a Hyper-V management OS (the host OS) is there only for the management OS itself … and that management OS doesn’t need much RAM or performance. You save capacity and performance for your VMs.
There was a time when we used to advise configuring the paging file on Hyper-V hosts. But that all changed with the release of WS2012. Lots of little things that we advised tweaking (like memory reserve) should never be tweaked now. That’s because Microsoft built in automated management for Hyper-V management OS installations.
Now the official line on the paging file is:
For Hyper-V servers that run Windows Server 2012 or Windows Server 2012 R2, the page file should be left at the default of setting of System Managed. This is per the Hyper-V Product Group.
That comes from a KB article called How to determine the appropriate page file size for 64-bit versions of Windows that gives you guidance on how to setup or configure the paging file on x64 Windows installations.
So that makes it official & simple: leave the paging file on Hyper-V hosts with the default configuration.
For those of you who mistakenly call their VMs “Hyper-V servers” this guidance has nothing to do with the guest OS of your VMs. Configure the paging file of your VMs according to best practice for the OS and the services that it is running.