lima-vm / alpine-lima

Create an alpine based ISO image for lima
Apache License 2.0
42 stars 28 forks source link

Running qemu-emulated binaries passes wrong arguments. #81

Closed mook-as closed 2 years ago

mook-as commented 2 years ago

Versions involved:

Steps to reproduce:

Expected results:

Linux lima-alpine 5.15.57-0-virt #1-Alpine SMP Fri, 29 Jul 2022 07:15:20 +0000 aarch64 Linux

Actual results:

a: applet not found

Additional Information

I believe https://github.com/tonistiigi/binfmt/commit/c5e21394c9378124b17cdf9c4a1c09b119cfba17 added a patch to the qemu in use to assume the preserve-argv flag in binfmt_misc when no flags are found; I assume that code is somehow being triggered.

Workaround (and likely fix): Add binfmt_flags="POCF" to /etc/conf.d/qemu-binfmt.

References: https://github.com/rancher-sandbox/rancher-desktop/issues/2668 / https://github.com/rancher-sandbox/rancher-desktop/issues/2659