Re:WSL2 corrupting Git repositories and shell history
by freeone3000 on Saturday January 02, 2021 @01:25PM
(#25615004)
WSL VMs are gen2 (fully paravirtual) hyper-v VMs, so use dynamic memory allocation. VirtualBox, even with Hyper-V as its engine, doesn't do this. I don't think any standalone Linux distros offer a standalone Hyper-V paravirtual image that is not a WSL2 image.
[ Parent
| on HN ]
Re:WSL2 corrupting Git repositories and shell history
by Cu3PO42 on Saturday January 02, 2021 @02:55PM
(#25615878)
The Ubuntu image you can select in the "New VM" dialog in the Hyper-V management tool (or whatever it's called) absolutely does work with dynamic memory allocation and I seem to recall getting it to work on an Arch VM as well.
I believe the "Linux Integration Services" for Hyper-V are actually mainlined at this point so I would expect most things to work. Setting up RDP for enhanced desktop sessions is the only painful thing I remember.
Re:WSL2 corrupting Git repositories and shell history
by AshamedCaptain on Sunday January 03, 2021 @10:29AM
(#25622280)
You don't need paravirtualization to do dynamic memory allocation -- all VMs do this.
Re:WSL2 corrupting Git repositories and shell history
by freeone3000 on Sunday January 03, 2021 @05:27PM
(#25625813)
No. Gen1 images use a fixed allocation pool instead of an oversubscription model. You need a gen2 image with a cooperative memory allocator on the guest in order for this to work properly.
Re:WSL2 corrupting Git repositories and shell history
by AshamedCaptain on Thursday January 07, 2021 @06:31AM
(#25669849)
Well, so barring ancient HyperV versions, all VMs do it. This is more of a guest thing than hypervisor thing, anyway. All the VM needs to support is balloning and this is completely unrelated to paravirtualization.