This message was deleted.
# lima
a
This message was deleted.
a
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
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
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
Another option is to use OpenStack image builder
a
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
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
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
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
Nice... Thanks @fast-garage-66093... I'll give that a try...