Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ability to import standalone qemu instances to lima to manage #881

Open
developer-guy opened this issue Jun 6, 2022 · 6 comments
Open
Labels
component/qemu QEMU enhancement New feature or request

Comments

@developer-guy
Copy link
Contributor

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

@developer-guy
Copy link
Contributor Author

For detailed context, see:

docker/buildx#1078

@AkihiroSuda
Copy link
Member

What do you mean by "import"

@AkihiroSuda AkihiroSuda added the enhancement New feature or request label Jun 6, 2022
@developer-guy
Copy link
Contributor Author

What I mean by import is handing over to lima for managing the state of my VM created by me.

@jandubois
Copy link
Member

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?

@developer-guy
Copy link
Contributor Author

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.

@jandubois
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/qemu QEMU enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants