lima
lima copied to clipboard
ability to import standalone qemu instances to lima to manage
Description
lima can create VMs based on QEMU. I could also create VMs based on QEMU, in those cases, I'd like to import this VM to lima to be managed by it like the env driver of buildx which lets you create a buildkitd daemon separetely and add it as a builder instance to buildx.
cc: @AkihiroSuda @dentrax
For detailed context, see:
https://github.com/docker/buildx/pull/1078
What do you mean by "import"
What I mean by import is handing over to lima for managing the state of my VM created by me.
This is not possible; the VM must be created/managed by Lima, which provides configuration via cloud-init.
If you create the VM manually, why don't you want to start/stop it with qemu as well?
This is not about just starting/stopping, and it is about installing the necessary tools and software to my VM based on cloud-init configs provided by lima. When lima installs the necessary tooling to my VM, then my VM becomes one of the VMs that lima can manage/start/stop. I'm just shooting in the dark.
Ok, I think this can work as long as your VM is using just a single disk image: shut down your VM and reference the image in a new lima.yaml
file:
images:
- location: ~/some/path/my-vm.qcow2
arch: "x86_64"
And then create a new Lima VM with that config. It should copy the image of your existing VM and use it as the basedisk
of a new machine. Not sure if this is "importing", but I guess you can argue that it is.