packer-plugin-qemu icon indicating copy to clipboard operation
packer-plugin-qemu copied to clipboard

Feature: provide Libvirt domain XML to QEMU builder to match specific hardware configuration

Open ghost opened this issue 3 years ago • 1 comments

This issue was originally opened by @Wenzel as hashicorp/packer#6500. It was migrated here as a result of the Packer plugin split. The original body of the issue is below.


Feature Request

Problem

If a Windows image is built with Packer QEMU builder and later on imported in Libvirt, the hardware configuration has changed, and Windows spend some time installing the new drivers.

Furthermore, you might want to match your future VM hardware configuration while provisioning, as certain registry keys will not be present until the right hardware is attached.

The Packer QEMU builder allows to customize the commandline with qemuargs, however this is extremely tedious to look at the Libvirt QEMU command line, and try to adjust the qemuargs to match the same hardware.

Feature

Allow the QEMU builder to specify a Libvirt domain XML, and use this as a hardware configuration to build and provision the image.

-> Should we add a domain_xml field into QEMU builder ? -> Should we create a totally new Libvirt builder, since we will call the Libvirt API to import, start and stop the VM, since Libvirt invokes QEMU by itself ?

Waiting for you feedback on the feasibility of this feature !

Thanks.

ghost avatar Apr 19 '21 16:04 ghost

curious to know what new drivers will be installed ... @wenzel

jshen28 avatar Sep 08 '21 11:09 jshen28