feat(image-boot): add ability to boot livecd-style ISO#103
Open
reubeno wants to merge 3 commits intomicrosoft:mainfrom
Open
feat(image-boot): add ability to boot livecd-style ISO#103reubeno wants to merge 3 commits intomicrosoft:mainfrom
reubeno wants to merge 3 commits intomicrosoft:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds LiveCD/installer-style ISO boot support to azldev image boot by extending the QEMU runner to optionally attach a bootable ISO and by teaching the command to create an empty qcow2 disk when booting from ISO without an existing disk image.
Changes:
- Add
--isoand--disk-sizetoazldev image boot, including updated validation/flow to support ISO-only boot with an auto-created empty disk. - Extend QEMU invocation to support a bootable install/live ISO (bootindex ordering) alongside the existing cloud-init seed ISO.
- Simplify cloud-init user schema representation and add unit tests around new boot flag behaviors.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/utils/qemu/qemu.go | Adds optional InstallISOPath handling, a qemu-img prerequisite check, and qcow2 creation helper. |
| internal/utils/cloudinit/cloudconfig.go | Removes user-level fields from the cloud-init user schema struct (keeps minimal fields used). |
| internal/app/azldev/cmds/image/boot.go | Adds --iso / --disk-size, refactors boot flow to support ISO-only boot and conditional prerequisite checks. |
| internal/app/azldev/cmds/image/boot_test.go | Adds flag presence/default tests and validation error tests for new boot modes. |
| internal/app/azldev/cmds/image/boot_internal_test.go | Adds targeted unit test coverage for cloud-init decision logic. |
| docs/user/reference/cli/azldev_image_boot.md | Updates generated CLI docs to reflect new flags and behavior. |
- Validate '--disk-size' is non-empty when creating an empty disk for ISO boot. - Lock test user password and disable SSH password auth when no password is provided (avoids unlocked account with no defined password). - Use prereqs.RequireExecutable for qemu-img check to give actionable install hints. - Use fileutils.MkdirTempInTempDir when WorkDir is unset so injected filesystems resolve the temp dir consistently. - Add unit tests for InstallISOPath bootindex behavior, CreateEmptyQcow2, and CheckQEMUImgPrerequisite. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Adds
--isooption toazldev image boot.