Skip to content

Commit

Permalink
fix: support extra-disks when using iso
Browse files Browse the repository at this point in the history
When using `iso` and `extra-disks` we're getting errors like below for
any nodes than the first node.

```text
qemu-system-aarch64: -cdrom _out/metal-arm64-secureboot.iso: drive with bus=0, unit=2 (index=2) exists
```

Fix by explicitly specifying the the media is cdrom, so qemu doesn't
index.

Signed-off-by: Noel Georgi <git@frezbo.dev>
  • Loading branch information
frezbo committed Oct 16, 2024
1 parent f2bff81 commit fc89dc2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/provision/providers/qemu/launch.go
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,8 @@ func launchVM(config *LaunchConfig) error {
if !diskBootable || !config.BootloaderEnabled {
if config.ISOPath != "" {
args = append(args,
"-cdrom", config.ISOPath,
"-drive",
fmt.Sprintf("file=%s,media=cdrom", config.ISOPath),
)
} else if config.KernelImagePath != "" {
args = append(args,
Expand Down

0 comments on commit fc89dc2

Please sign in to comment.