fix(qemu): swap boot order so disk has priority over ISO#135
Merged
reubeno merged 1 commit intomicrosoft:mainfrom Apr 30, 2026
Merged
fix(qemu): swap boot order so disk has priority over ISO#135reubeno merged 1 commit intomicrosoft:mainfrom
reubeno merged 1 commit intomicrosoft:mainfrom
Conversation
UEFI/OVMF respects bootindex on every boot. Previously the ISO had bootindex=1 (highest) and the disk bootindex=2, causing the VM to always boot the ISO — even after the installer wrote an EFI bootloader to disk. Give the disk bootindex=1 and the ISO bootindex=2. On first boot the firmware tries the empty disk, finds no bootloader, and falls through to the CD-ROM so the installer runs normally. After installation the firmware finds the new bootloader on disk and boots from it directly. Co-authored-by: Copilot <copilot@github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates QEMU argument generation so that, when an install/live ISO is attached, the VM prioritizes booting from disk and treats the ISO as a fallback—addressing UEFI/OVMF behavior where bootindex is honored on every reboot.
Changes:
- Swap
bootindexpriorities so the disk usesbootindex=1and the install ISO usesbootindex=2. - Update inline documentation in
RunOptionsand the runner’s boot-order comment to describe the new behavior. - Update the QEMU runner test expectations to match the new boot order.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
internal/utils/qemu/qemu.go |
Changes bootindex assignment so disk is always first and ISO is fallback; updates comments to explain UEFI/OVMF behavior. |
internal/utils/qemu/qemu_test.go |
Adjusts the test case name and expected argument fragments to match the new bootindex ordering. |
reubeno
approved these changes
Apr 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
UEFI/OVMF respects bootindex on every boot. Previously the ISO had bootindex=1 (highest) and the disk bootindex=2, causing the VM to always boot the ISO — even after the installer wrote an EFI bootloader to disk.
Give the disk bootindex=1 and the ISO bootindex=2. On first boot the firmware tries the empty disk, finds no bootloader, and falls through to the CD-ROM so the installer runs normally. After installation the firmware finds the new bootloader on disk and boots from it directly.