-
Notifications
You must be signed in to change notification settings - Fork 15
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
Option to persist domain after built #15
Comments
Another idea is to have a libvirt post-processor (taking a volume as the input). This is a more flexible solution and I can use QEMU plugin with it. Right now my work around is to use QEMU plugin to build the box, import it to libvirt with this plugin, then have an intentionally failed provision script to persist the domain. |
Hi, First, about the issue of persisting the domain itself: Your idea of importing/uploading artifacts built by the qemu provider in the post-processing step sounds good. To manage expectations: I'm still having some busy days ahead of me, then a long vacation. I'll probably get back to this at the end of September or the beginning of October. |
I know about and have been using the Terraform provider before trying to accomplish the same thing with Packer alone. This way I can avoid duplicating the machine specs in both Packer and Terraform configuration. For the first idea, yes, I agree that having a domain running after a build goes against the purpose of using Packer. I should have used the right words there. What I meant is to have an option to export a domain definition file (a For the second option, if you agree with making a |
The reason for wanting to persist a domain definition instead of only the volume is that unlike other Packer plugins, libvirt doesn't provide a convenient way to get a VM from a volume alone. Writing a domain xml file from scratch is pretty horrible. For comparison, virtualbox plugin provides a way to export the built machine (OVA/OVF file with VM specs defined) that can simply be imported to have a VM running. |
Currently, after a successful build and the domain is stopped, the domain will be undefined.
I'd like to have an option to persist domain as an artifact (much like what we can do with volume).
Use case: after the domain is built and persisted, I can invoke
virsh
or usingvirt-manager
to use the VM right away. I think having the volume alone is kind of useless (I can use QEMU if I only want to build the volume).The text was updated successfully, but these errors were encountered: