lima icon indicating copy to clipboard operation
lima copied to clipboard

There should be an option to run provisioning scripts after mounts are done

Open jandubois opened this issue 4 years ago • 2 comments

Right now provisioning scripts cannot use files from the host filesystem because the mounts are created by the hostagent on request of the guestagent. There should be a mechanism to run additional provisioning scripts once the instance is deemed to be fully initialized.

jandubois avatar Oct 04 '21 16:10 jandubois

Provisioning scripts should be executed always after mounts are setup

AkihiroSuda avatar Oct 05 '21 06:10 AkihiroSuda

Provisioning scripts should be executed always after mounts are setup

https://github.com/lima-vm/lima/pull/720#issuecomment-1069004001 shows an example where a provisioning script needs to run before mounts are working: to add support for a distribution not directly supported by lima. You can't install sshfs if your mounts rely on sshfs already being installed.

jandubois avatar Mar 16 '22 17:03 jandubois

Is this issue still accurate? I seem to have no problem accessing files from the host via mounts in my provisioning scripts, using v0.16.0.

Wondering whether this was intentionally fixed, or if I'm just getting lucky with timing somehow.

goonzoid avatar Jul 18 '23 16:07 goonzoid

Is this issue still accurate?

I believe this issue is accurate when you are using mountType: reverse-sshfs. If you are using e.g. 9p then the mounts are already in place before the provisioning scripts run.

jandubois avatar Jul 18 '23 18:07 jandubois