https://rancher.com/ logo
#lima
Title
# lima
a

adamant-kite-43734

07/02/2022, 4:00 PM
This message was deleted.
a

average-carpet-40645

07/03/2022, 11:41 AM
Technically, you can copy
~/.lima/<instance-name>
to another machine at same location and it should work as long as • it is same architecture i.e arm/x86 • the provision script has no dependencies on the mounted volumes • The user has same uid and name on the other machine. The third point is the main issue except you’re simply transferring between your personal machines. And even at that, there is a good chance of your user having a different uid and name.
l

lemon-wire-57428

07/03/2022, 1:47 PM
Thanks @average-carpet-40645 Is there a way around the third point? I tried to copy
~/.lima/<instance-name>
but ran into an ssh issue when starting up the VM
f

fast-garage-66093

07/04/2022, 3:43 AM
The idea really is that any kind of customization would be done via provisioning scripts, so the VM instance can always be recreated from just the template. In which case you would only need to share the
lima.yaml
file and not the actual instance.
b

best-accountant-68201

07/05/2022, 4:56 AM
Another option is to use OpenStack image builder
a

average-carpet-40645

07/05/2022, 5:43 AM
oh, I didn’t read his question properly. I assume he wanted to transfer a VM with its state (i.e. volumes) across machines.
provision scripts is all you need for the extra customization
f

fast-garage-66093

07/05/2022, 5:58 AM
I think you read it correctly; that he wanted to share the volumes. That way you can do the customization interactively.
But using provisioning scripts avoids many of the problems, and also has the advantage that you can build a new image from a newer release quite easily instead of updating the image yourself over time.
l

lemon-wire-57428

07/05/2022, 1:20 PM
Thanks guys... Yeah, I wanted to build an image with everything setup, and all they would do would be to download the image, extract it, start it and be on their way... Kinda like creating a base... I was trying out the
lima.yaml
but was timing out before the setup was done... Is there a way to extend the timeout while it's doing its thing/setup?
f

fast-garage-66093

07/05/2022, 4:38 PM
You should create a readiness probe for your provisioning script; then you can control the amount of time you are willing to wait until it is ready: https://github.com/lima-vm/lima/blob/e0852c9cf1d075623ac8f18ca9e557df37fe98c9/examples/default.yaml#L184-L187
l

lemon-wire-57428

07/07/2022, 12:23 AM
Nice... Thanks @fast-garage-66093... I'll give that a try...
9 Views