hashicorp / packer-plugin-qemu

Packer plugin for QEMU Builder
https://www.packer.io/docs/builders/qemu
Mozilla Public License 2.0
59 stars 43 forks source link

Kernel and initrd source for QEMU builder #15

Open ghost opened 3 years ago

ghost commented 3 years ago

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


Currently Packer supports booting QEMU builders from ISO files (iso_url).

I propose a new feature that enables Packer to install directly from kernel and initrd. Technically this could be by means of injecting iPXE config or similar.

The virt-install tool provides a similar --location option. See: http://manpages.ubuntu.com/manpages/xenial/man1/virt-install.1.html

What I am looking for is perhaps a little more flexible, where we can define kernel, initrd and kernel parameters.

This would greatly simplify e.g. Ubuntu installations.

ltrager commented 3 years ago

qemu supports this directly with the -kernel, -initrd, and -append command line options. You don't need to use iPXE as qemu will boot directly into the kernel when specified. Adding support for this will allow for much smaller download sizes when creating Linux images. Canonical provides the kernel, initrd, and a SquashFS image at https://images.maas.io/ephemeral-v3/stable/

bersace commented 3 years ago

Very interesting feature ! CentOS supports such installation. Which is way more efficient than downloading that 600M netinstall. It's a common way of bootstraping a VM with virt-install/virt-manager.