It's mind blowing to think about the cavalier attitude to system resources when I think back to the systems I started out on.
I agree, and that's one reason why I like using virtual machines.
When I start a VM, I start from a snapshot
Conversely, I don't
My VMs never boot/shutdown/reboot
Mine do, so I know they are starting clean. But I shut down my PC every night (or morning, as the case may be) and I understand that's not common nowadays.
I usually hibernate mine (suspend to disk, with power off). But that has no impact on what you do with your VMs!
Checkpointing is not a feature the OS provides; it is a feature that naturally arises from virtualization. The virtualized system is just not executed anymore, and its exact, complete state is stored on disk. When started from such a stored state, all the virtualized system notices is that clock skipped forwards a bit, and some of the open network connections may have timed out.
It also means that you really gain nothing by letting your virtual machines boot and shut down every time you use them, you are just wasting time and resources. It is not any more reliable or robust or 'clean' than starting from a checkpoint.
(Fun fact: Linux does have a similar facility,
checkpoint/restart, that can freeze an application and store it on disk, and later restart it from the disk image; from the point of view of the application, all that happens is time skips forwards.)
If you consider such checkpointed virtualized systems, they provide the perfect mix of resource use and compatibility: the virtualized machine only runs when it is needed, but is exactly the real system –– well, except from virtualized hardware devices, like display drivers.
The cost is disk space.
Which is not insignificant. And since one reason for using a VM is to isolate some process, one tends to end up with several to many VMs since there is never one process.
Well, I don't use VMs to isolate a process, actually. I rarely have more than one VM running at the time.
The reason I like WSL2 using a Linux kernel in a VM, is that I seriously doubt MS's technical capability and resources of maintaining a robust and complete emulation layer otherwise. It is drudge work, not very interesting, and you'd have helluva time of actually retaining the developers capable of maintaining it. At least with a VM'd kernel, that interface won't have the bugs that a plain library-like emulation layer would. It is in many ways yes, it wastes resources, but that does not affect my opinion because I don't run Windows.
If you ask me, running an entire Linux distribution, checkpointed and not booted/shutdown every time it is used, would be better, because that way you have a real native environment without all that emulation,
and the compatibility issues it inevitably causes. Of course, that does not work for Microsoft due to business reasons: heck, many of their users might discover that they don't actually
need Windows for anything.
Which is not to mention that if it's a serious VM then it would take up the same amount of space as one's working machine. That would double the resources, would it not?
No, only storage space. Typical serious VM images I use have 8 GiB to 16 GiB images, but those are sparse (i.e., only used chunks take actual storage space). To do the stuff I want to do, I typically have about 256 GiB of unused disk space –– some things I play with take a lot of space, temporarily.
In essence, I need that storage space anyway. When I use a VM –– that is, when a VM is running –– I use whatever that is that is in that VM, so the hardware resources (CPU, memory) is mostly used by that VM. When the VM is not in use, it is stored in checkpoint state on disk, and only uses storage space, not CPU or RAM resources.