2/3 I had a recent look at #tinyvmm and I don't remember half of what makes it work. Is it an extremely compact and efficient VM manager? Yes. Does anyone care about it being such? Not at all. Even the concept of embedding cloud-hypervisor into the single binary failed, because it's more hassle than it's worth.
So what do I write for fun? #go for binaries, #python for exploratory coding. Go's easy to get up and running and has fast build times. Python comes with ipynb and polars.
@raito I don't think it's one-size-fits-all , really. Like, I wouldn't want nix-based setup to manage my whole kubernetes cluster declaratively, #argocd works much much better for that. But I would want nix to manage argo itself because the abstractions are better.
Same for VMs. I don't want nix to manage the #tinyvmm because running VMs is often an imperative process. I'm fine with the "state". Not everything can be declared in a pure way.
But still, nix is so good for so many things.
#blog Migrating Forward: https://farcaller.net/migrating-forward/
I was thinking about a simple way to support model migrations in #tinyvmm and here's what I came up with.
No combination of networkctl {reload,renew,reconfigure} got me to convince its dhcp server to re-read the static assignments.
Good that I already wrote a dhcp server in rust.
#tinyvmm smh.
Wrote some more details on my #networkd issues with #tinyvmm today: https://farcaller.net/the-woes-of-networkd/
Me: trying to debug an obscure but where SOMETIMES curl http://somehost would timeout but it would mostly work ok most of the time.
Soooooooo... if you tell networkd to reload over dbus, you'll momentarily lose the network connectivity. And #tinyvmm was doing that every 10s becasue I thought it's a cheap way to make sure the configs are up-to-date.
For fuck's sake.
I got #tinyvmm mostly working before the end of the year \o/
https://github.com/farcaller/tinyvmm is my new vm manager, replacing https://github.com/google/vmregistry. I got rid of libvirt, qemu, dnsmasq, and pretty much everything; tinyvmm is a single binary operation! (technically it requires cloud-hypervisor in the MVP, but that will go away).
I struggled with a *simple* VM setup over the years and I'm finally happy to have something that does the only thing and plays nice with the rest of the system.
Eventually I settled on "reinventing the k8s's apiserver model" and reconciliation for my #tinyvmm thing. While it's not much practical to do reconciliation and instead I *should* reply on {system,network}d doing the right thing, the last couple weeks clearly demonstrated I have to babysit those. Besides, I'd have to reconcile nftables either way, and there's still a dns server to consider.
Looking at my code circa 2017 (https://github.com/google/vmregistry) it's clear I did learn a couple new tricks