Linux virtual machines, with a focus on running containers
lima-vm.io
lima-vm.io
Lima, OTOH, is more of a nice way to run a Linux VM on Mac in a way that integrates the guest and the host systems to a good degree by default. It wraps either QEMU or Apple's VZ framework.
In my mind, Lima is spiritually similar to https://github.com/89luca89/distrobox, but for a Mac host
For a more traditional VM GUI, there's https://mac.getutm.app/ which is a completely separate free project that also wraps QEMU or VZ. It will run any OS you want, not just Linux.
> The key difference is that Colima launches Docker by default, while Lima launches containerd by default.
Why use either? Aren't they both just "opinionated" wrappers around this basically:
qemu-system-aarch64 \
-M virt,accel=hvf \
-cpu host \
-smp cpus=8 \
-m 8192 \
-boot d \
-drive if=pflash,format=raw,file=/opt/homebrew/Cellar/qemu/9.0.0/share/qemu/edk2-aarch64-code.fd \
-drive if=virtio,format=qcow2,file=debian-12-nocloud-arm64.qcow2 \
-net nic \
-net user,hostfwd=tcp::2222-:22,hostfwd=tcp::6443-:6443 \
-device virtio-gpu-pci \
-device nec-usb-xhci \
-device usb-kbd \
-device usb-tablet \
-nographicIf you were interested, Brew also offers "opt" links to avoid hard-coding version numbers into paths:
-drive if=pflash,format=raw,file=/opt/homebrew/opt/qemu/share/qemu/edk2-aarch64-code.fd \
and if one happens to be already running with $(brew shellenv) then -drive if=pflash,format=raw,file=${HOMEBREW_PREFIX}/opt/qemu/share/qemu/edk2-aarch64-code.fd \
will allow the script to work on both arm and x86_64 setupsIt’s really, really, really awesome and performant. And it seems to be a one-man show. Really impressive. I’ve switched from docker for desktop a year ago, and it’s been a night-and-day difference.
Most I’ve shown it to have very quickly switched to it as well.
(I’m completely unaffiliated, just a very happy user)
My problem is that embedded systems usually have little compute power so compiling stuff for them is really tiresome (and cross-compiling is another nightmare), so I apt-get what I can and compile as little as possible.
Also, afaiu, Nix is tied to a particular version of libc which has a high probability of not working with the vendor-installed libraries on my systems.
> Also, afaiu, Nix is tied to a particular version of libc which has a high probability of not working with the vendor-installed libraries on my systems.
Nix ships a whole dependency tree with every package, down to and including a libc. If you have another libc, Nix won't care.
On the other hand, if your hardware isn't supported by the libc Nix ships, the natural path is probably to package whatever given libc in Nix and build against that. Then you are back to building from source via Nix.
Nix has pretty good support for cross-compilation, multilib, and 'remote builders', though. You can set your embedded systems up so that Nix builds happen on more powerful machines and then get copied over.
Nix evaluation itself requires a lot of RAM, though, so if you use Nix for embedded you probably still want to push packages to the weaker systems from the outside.
Unless your problem/complaint is deeper then that.
Bored sysadmin: All I do is install X, Y, & Z over and over again. Surely there's more to life then this.
or
Resource-minded DevOps: Hey, it seems like we install the same 4 packages on these hundreds of containers! Surely there's something we can do to optimize this!
And the number of required packages gets bigger and bigger.
But with Nix!...Now you have two problems.
I'm no expert, but I've encountered the "stick to one process per container" rule of thumb many many times. Could you please share your perspective? Thanks in advance.
It's also a solvable problem for most part. If you have a set of packages almost all the software needs, someone should probably create base image for everyone with everything pre-installed so your dockerfile starts with FROM companybaseimage:latest
It's not a solved problem because build systems keep breaking in random places.
Granted, these problems are in general easy to solve. But we're talking about death from a thousand papercuts here. In other words, boredom from a thousand compile errors.
Anyway, I wish I had a Dev Team like you have to solve these problems for me ...
Noting that I am being frank and honest here, but you don't have a dev problem here, but most likely an organization level problem.
Namespaces and interface contracts should be dramatically reducing dependency issues, not causing them to explode.
The most naive thought it was good for security reasons.
It kept a lot of people busy during the ZIRP era when money was abundant or corporation were moving to the cloud.
My guess is either the industry is gonna stagnate or a new simpler solution to package and run application is gonna appear sooner or later.
I've found Multipass https://multipass.run/ by Canonical and I wonder if anyone recommends it.
I swear that I used to run it on my Mac (I know I ran SGE, but I’m 90% sure I installed SLURM at some point).
Are you trying to run Mac jobs or Linux jobs? Is there a reason you need to run it in Docker (which still runs in a Linux VM, doesn’t it)?
I switched to using a more lightweight scheduler when I need to run a batch job on my Mac. But even then, I’m running Mac jobs (or generic *nix jobs), not Linux specific code/containers.
But, if you need to manage a Linux VM for SLURM (or any other reason), I really like Lima.
With a view to use lightweight Linux VMs (alpine) to:
* Easily spin up and manage lightweight Alpine Linux environments.
* Use tiny VMs to take advantage of containerisation technologies, including Incus, LXD and Docker.
* Build and test software on x86_64 and aarch64 systems.
Also can it interact with the host microphone and play sounds thru host speaker etc?
All nice if you need a system to try something quickly. But nowadays I just want to use infra as code. With Nix(OS) and docker/podman compose a system is clean and comprehensible. I feel like I don’t really need VMs anymore.
Does this replace Vagrant, VirtualBox, or something else, and I have the wrong paradigm?