Skip to content

feat(image-boot): add ability to boot livecd-style ISO#103

Open
reubeno wants to merge 3 commits intomicrosoft:mainfrom
reubeno:iso-boot
Open

feat(image-boot): add ability to boot livecd-style ISO#103
reubeno wants to merge 3 commits intomicrosoft:mainfrom
reubeno:iso-boot

Conversation

@reubeno
Copy link
Copy Markdown
Member

@reubeno reubeno commented Apr 17, 2026

Adds --iso option to azldev image boot.

Copilot AI review requested due to automatic review settings April 17, 2026 18:51
@reubeno reubeno marked this pull request as ready for review April 17, 2026 18:55
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 --iso and --disk-size to azldev 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.

Comment thread internal/app/azldev/cmds/image/boot.go
Comment thread internal/app/azldev/cmds/image/boot.go
Comment thread internal/utils/qemu/qemu.go
Comment thread internal/utils/qemu/qemu.go Outdated
Comment thread internal/utils/qemu/qemu.go
Comment thread internal/app/azldev/cmds/image/boot.go
- 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>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Comment thread internal/app/azldev/cmds/image/boot.go
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants