dmacvicar / terraform-provider-libvirt

Terraform provider to provision infrastructure with Linux's KVM using libvirt
Apache License 2.0
1.54k stars 457 forks source link

Removed dependency towards mkisofs system binary #935

Closed MadsRC closed 1 year ago

MadsRC commented 2 years ago

This fixes #934

It introduces a new dependency that replaces the need for the external mkisofs binary. I'd also like for it to replace the hooklift/iso9660 dependency, but that would potentially require changing the signature of a few functions (setCloudInitDataFromExistingCloudInitDisk takes an os.File, where go-diskfs prefers to handle the files itself).

Before making considerable changes, I'd like to ask the current maintainers what they prefer be done?

jbeisser commented 2 years ago

go-diskfs doesn't support RockRidge or Joliet extensions (yet). But, libvirt and kvm+qemu does support vfat for for the user-data image, and so long as a disk image can be built (qemu-img's raw works, qcow2 does not in quick testing of a VM in libvirt), and diskfs supports that.

You actually hit on the next problem I was looking to solve in my quest to have this just work. So, thanks!

dmacvicar commented 2 years ago

Would it make sense to use this library to generate VFAT images and also switch to virtio devices instead of CDROM? It would at least address the pitfalls raised in https://github.com/dmacvicar/terraform-provider-libvirt/pull/895

jbeisser commented 2 years ago

I need to test some things, but under libvirt 4.5 on CentOS 7 I had some issues with vfat being hooked up correctly.

It may be due to missing parameters.