I use a MacBook Air M1 as my dev laptop, and I just wanted to have a reproducible dev environment running Debian.
My options: use devcontainer, or use a VM on Virtualbox, VMWare, Parallels, UTM, etc.
VSCode & Typescript gets messed up every now and then, such that they don't work and I simply can't continue with them. Not sure why, but I think there are weird internal bugs in those that surface whenever there is some special combination of circumstances on my machine. With devcontainer I think VSCode still runs directly on my machine but connects to the container, so this is nto a solution for me, I need a real VM.
So I try VirtualBox first. After spending hours installing Debian on a VM and getting it running nicely, within a short time the VM slows to a crawl. Nothing I do reliably fixes this. I also cannto get the display resolution to behave properly. I give up on VirtualBox, again (I keep trying this every few years forgetting why I don't use VirtualBox)
Next, I want to try VMWare, only to find out it is sold to Broadcom, and when I follow the link to their page, I'm supposed to log in to download, and yet I see no way to register. Oh well.
Next, I try Parallels. After getting a Debian VM running on it, I marvel at how smoothly it works. I'm in the trial, but I'm not going to have a problem paying up if everything goes on well. Alas, it was too good to be true. I start to to have random loss of internet connectivity (weirdly affecting the terminal only) in the VM. I see that the default networking mode is shared networking. I read guides online suggesting to switch to bridged networking. After spending oodles of time setting up the firewall and other security configuration on the VM and switching to bridged networking, I'm still having intermittent connectivity issues. it seems they are even worse now. Suddenly I remember again why I don't have a Parallels subscription after all these years.
Frustrated, I finally give up. I ruefully remember that UTM also has similar performance and screen display problems as VirtualBox.
So what options are left? I can't really physically install a dual-boot Linux on my Macbook (Asahi notwithstanding, since I only want Debian). Maybe I could sign up for a cloud VPS and use that. Or just buy new AMD mini PCs and run Debian on those. Either way, it's clear the virtualization story, after decades of supposed tech advancement, is still a bitter one.
I am running 100% automatically deployed/configured Debian desktops on Apple hardware for several years now, Intel and M1 CPUs. (100% reproducible is another level and another story).
Right now and for most of the past years I am running VMWare Fusion, which works with the features I need as long as you don't update macOS immediately after a new major revision was released. (Apple messing up internal APIs nearly every time.)
Sometimes in the past I also used the QEMU version provided by macPorts, and the only issue I had was with my non English keyboard, if you use a US keyboard layout you shouldn't have any issues at all.
Still, I am surprised, you seem to imply that you need to provision a new VM because of trouble with TypeScript/VSCode? Not sure what you are doing, or what plugins in VSCode you are running, but that I have to provision an entirely new VM to solve such kind of problems never happened to me and I haven't heard about that in my environment (big company, quite a lot of VSCode and TypeScript users).
Virtualization is definitely solved for your use case on Linux. Personally I use virt-manager for the UI but its all qemu underneath AFAIK.
Just now things are starting to catch up, but there's still a wide gap in features; Apple Virtualization Framework is still very limited. And a personal limitation I hit recently, no USB4/Thunderbolt passthrough anywhere, not in UTM (which uses AVF), not in VMWare either.
Also remember the final Apple Silicon version of VMWare supporting M1/M2 wasn't available until November 2022 (it was a tech preview before), while all the Broadcom situation was ensuing. And I think only as of 2024 it runs smoothly. So far it's still the most reliable for desktop Linux VMs for me. Windows 11 for ARM runs very well too, and it does x86 emulation transparently, even 2010s games run well.
I haven't tested VirtuaBox on latest Mac versions as I'm happy with VMWare Fusion (also on ARM M1/M2 machines). The product is still good, regardless of Broadcom's business shenanigans.
Edit: If Parallels works for you, but only the SSH terminal sessions get stuck, maybe the "shared network" connection drops your connections for some reason. Before diving too deep into troubleshooting this across layers, you could try out the usual suspects workaround, setting SSH TCP keepalive. I have this for some connections in my ~/.ssh/config file:
TCPKeepalive yes
ServerAliveInterval 30
Apple fails to offer true, useful nested virtualization.
Canonical (Ubuntu) is run by unreasonable people.
VMware ESXi... for servers and Brocade sucks.
Have you tried using Colima [1] with a Docker volume, instead of all those heavyweight tools?
[1] https://github.com/abiosoft/colima
I think I need a full VM, since I am working on stuff that require a fully isolated environment.
https://wiki.debian.org/Teams/Bananas
https://www.arthurkoziel.com/qemu-ubuntu-20-04/ https://www.arthurkoziel.com/running-virt-manager-and-libvir...
Computers are cattle not pets and the simplest technical solution is a laptop that supports Debian. A Thinkpad for example.
Removing a dependency on VM’s would be a reasonable engineering strategy.
Also, dev containers should == server containers. This is the proper way to develop, and it's entirely unreasonable and impractical to also foist a server OS as a developer laptop OS. Use the most useful, comfortable, and practical developer desktop OS... which, sadly, is rarely Linux even these days because app support and OS usability still isn't at parity with the $$ ones post-Canonical. Invariably, it's Mac or Windows. If someone also wishes to make their lives more difficult (or perhaps easier), then all power to them to run a Linux distro or FreeBSD.
You mention Typescript which I’ll assume means some sort of web development, one thing to maybe consider is looking at https://omakub.org/ for inspiration on hardware choices and a setup. I don’t use it but was looking at it recently out of curiousity (I do Rails so thats how I’m aware of DHH and him leaving Apple HW).
https://github.com/evansm7/vftool
https://github.com/KhaosT/SimpleVM