Hyper-V does support memory ballooning (dynamic memory allocation from host to VM) - is that what you mean, or do I misunderstand?
This does need support in the guest VM, but I've only ever had issues with really old Linux distros.
This does need support in the guest VM, but I've only ever had issues with really old Linux distros.
Microsoft implemented a Firecracker style microVM (they call it "Krypton") for Hyper-V, which is used for WSL2, Edge Application Guard (run Edge in a VM), and Windows Sandbox. There aren't any real good docs on how to create one yourself using the Host Compute Service.
https://learn.microsoft.com/en-us/windows/security/threat-pr...
Also WSL2, if I recall correctly, has a relatively minimal base OS with a custom init binary.
I would say if you’re looking to use Host Compute Service, your best option would be to look at the way https://github.com/microsoft/hcsshim initializes containers.