Add swap support for WSLC virtual machines (separate ephemeral VHD) (#40375)
* Implement swap VHDX for WSLC virtual machines Create a swap VHD sized to the VM's memory during WSLCVirtualMachine::Initialize(). The VHD is created in the user's temp directory under wslc/, attached to the VM, formatted with mkswap, and activated with swapon. On failure, the VHD is detached and deleted via scope_exit. On success, the file is cleaned up in the destructor after the VM exits. Changes: - Add MemoryMb to WSLCSessionInitSettings IDL and plumb through WSLCSessionManager - Add swap VHD creation/attach/format/enable in WSLCVirtualMachine::Initialize() - Add swap VHD cleanup in WSLCVirtualMachine destructor - Consolidate temp folder under wslc/ (crashes subfolder) - Add SwapConfigured test to verify swap is active in the VM * Use dynamic VHD for swap and make test retry-tolerant - Use dynamic VHD instead of fixed for swap (reduces IO on boot) - Make SwapConfigured test use RetryWithTimeout to handle async swapon Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>