I want to install Flux alongside Lima with tools for tracing (e.g., eBPF) so we can start to see what Flux is doing under the hood!
To install I did:
VERSION=$(curl -fsSL https://api.github.com/repos/lima-vm/lima/releases/latest | jq -r .tag_name)
wget "https://github.com/lima-vm/lima/releases/download/${VERSION}/lima-${VERSION:1}-$(uname -s)-$(uname -m).tar.gz"
tar -xzvf lima-0.18.0-Linux-x86_64.tar.gz
This extracts the bin and share in the present working directory to add to the path.
export PATH=$PWD/bin:$PATH
Note that you need QEMU installed! And note there are instructions for other platforms here
For having a filesystem that is available on provision we are going to use virtiofsd, but we can't use the default that ships with QEMU (it doesn't work). Instead we will install a rust variant. Note that you'll need the rust version of virtiofsd for this to work (the old C version with QEMU did not work for me).
# This is in the PWD
git clone https://gitlab.com/virtio-fs/virtiofsd
cd virtiofsd
sudo apt install libcap-ng-dev libseccomp-dev
Then build with cargo.
cargo build --release
Then I replaced it.
sudo mv /usr/lib/qemu/virtiofsd /usr/lib/qemu/virtiofsd-c
sudo mv virtiofsd/target/release/virtiofsd /usr/lib/qemu/virtiofsd
I also did:
sudo usermod -aG kvm $USER
You can then copy assets into /tmp/lima
and the VMs that are using that mount will have access there on
startup.
The following recipes are included: