For traditional Hyper-V VMs, it is possible to enable HugePages allocation for a VM using Set-VMMemory -HugePagesEnabled, but it is not possible to do so for WSL2. Considering that WSL2 memory is dynamically allocated, to avoid fragmentation, it is best to allow users to specify a fixed size of HugePages that will be allocated and never freed at WSL2 startup.