Open leifliddy opened 1 year ago
I was able to workaround this issue with the following
qemuargs = [
["-drive", "file=${var.iso_path},if=virtio,index=1,id=cdrom0,media=cdrom"],
["-boot", "d"]
]
But it still would be nice to have a proper fix for it. Not sure why that aforementioned fix was only made for virtio-scsi
and not for virtio
as well.
Nevermind, that workaround doesn't register the hdd disk, so it's a pure cdrom boot.
Not sure why packer
can't just specify the cdrom with the -cdrom
argument as that would solve most of my problems.
But....there's one more thing that would need to be sorted out after that. Ok, let's say I have the following
-drive file=disk.qcow2,format=qcow2,if=virtio,cache=writethrough \
-cdrom boot.iso \
So if I try -boot once=c
or -boot once=d
I'm greeted with this
qemu-system-aarch64: no function defined to set boot device list for this architecture
However, just specifying -boot c
or boot d
work as expected.
I think this might be a difference between qemu-system-x86_64
and qemu-system-aarch64
qemu
is so complicated -- honestly I have no idea how you guys deal with this stuff. Differences in versions, platforms, and binaries....
I'm running into this exact same issue with
qemu-system-aarch64
(running on a macbook m2) except it's with thevirtio
interface.https://github.com/hashicorp/packer-plugin-qemu/issues/35
The issue is two fold.
I can only use the
virtio
interface for both the hdd + cdrom on this system. So I can't usevirtio-scsi
,sata
,ide
....etcSo I can't utilize this "fix" https://github.com/hashicorp/packer/issues/10211#issuecomment-778164090 As that comment shows, people were experiencing this exact issue years ago.
There's a device conflict: The error I'm getting is
Normally when I'm running
qemu
manually on my system, I use the following argumentand that works fine. But
packer
seems very opinionated in this area and forces the use of the-drive
argument I would like to request one of the following two features.Allow both cdrom & disk to use the
virtio
interfaces. The same logic already exists here for thevirtio-scsi
interface: https://github.com/hashicorp/packer-plugin-qemu/pull/40/commits/221d5f94ec7b9898eb5bbba29f61a88d6bfdee80Create an additional
iso_manual_args
option (or something like that) that would be mutually exclusive withiso_url(s)
So that users could simply manually specify the cdrom args themselves. Currentlypacker
enforces the use ofiso_url