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

Add support for libvirt provider #321

Open
cserby opened this issue Jan 31, 2022 · 9 comments
Open

Add support for libvirt provider #321

cserby opened this issue Jan 31, 2022 · 9 comments
Labels
enhancement New feature or request

Comments

@cserby
Copy link

cserby commented Jan 31, 2022

I'd like to use the windows10 images built from this repository, but due to licensing issues I'd prefer to use libvirt/QEMU instead of VirtualBox.

@gusztavvargadr gusztavvargadr added the enhancement New feature or request label Feb 6, 2022
@gusztavvargadr
Copy link
Owner

@cserby thanks for raising this. I cannot promise and actual timeline but will try to look into this in an upcoming release.

@JFrandon
Copy link

This would help us a lot as well, is there any way we could help?

@gusztavvargadr
Copy link
Owner

@JFrandon thank you for reaching out. I'm looking into this in one of the upcoming releases. I don't have an exact timeline yet, but I am making good progress with upgrading to Packer's HCL format and having a proper build matrix, after which I can pick this up.

Please let me know in the meantime which box(es) you'd prefer to have first, so I can prioritize those.

@cwegener
Copy link

I'm very curious about this feature. I did a very dirty hack myself to get something up and running locally with some manual intervention. I was using the qemu builder in packer to create the images that I needed to run on vagrant libvirt provider and it did work.

(I was mainly focusing on the Windows Server & Windows Server Core images - ws2022s and ws2022sc respectively)

@gusztavvargadr
Copy link
Owner

@cwegener @JFrandon if you have some approaches to share (like patches or PRs, or even some docs on how you use this) that could be some help. I am acticely using the providers this repo builds for at the moment (VirtualBox, VMware, Hyper-V), but have less experience with qemu / kvm.

Also, I will need to have reliable, on-demand agents to build the boxes later in a stable way, so any suggetions on typical setups are also welcome. Currently I use Azure and a bare-metal provider to build the images, but adding more providers will have some cost implications as well (compute and bandwidth) that I need to explore first.

@cwegener
Copy link

Unfortunately in my case it all was a bit of a one-off situation, so I didn't really put any effort into making it all work properly. I had to do a bit of manual hand-holding in order get the image built with the qemu builder.

If I get to make some time to revisit my approach, I'll take some notes and share them.

@gusztavvargadr
Copy link
Owner

@cwegener thanks anyway. I'm working on upgrading the templates to HCL2 so it would be ideally easier to make experiments and changes and maybe I can easily include qemu too.

@cwegener
Copy link

@cwegener thanks anyway. I'm working on upgrading the templates to HCL2 so it would be ideally easier to make experiments and changes and maybe I can easily include qemu too.

The main design problem that I ran into was that the Cake files seem to be very strictly structured around the fact the there will always be two different builder plugins. One builder plugin that is specifically for building from ISO and a separate builder plugin that is specifically used for cloning from existing VMs. That distinction of plugins is true for HyperV and Virtualbox.

But it is not true for QEMU. There is only one QEMU builder plugin and the same plugin is used for both tasks, building from ISO and cloning from existing VM disks.

If there is an easy way around this problem using the current Cake file structure, I could probably give the QEMU variant another go.

@gusztavvargadr
Copy link
Owner

gusztavvargadr commented Jul 30, 2023

@cwegener thanks for the details. I am trying to move away from that strict Cake-based setup with the HCL2 upgrade, where there are a lot more built-in options to extend the core templates, which was not possible in the old JSON-based world. After this upgrade ideally the addition of new providers would be a lot more simpler, not requiring this custom setup I have at the moment.

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

No branches or pull requests

4 participants