Skip to content

Add tool to generate iso images for kvm based tests#6318

Open
lamikr wants to merge 1 commit into
mainfrom
users/lamikr/wip/rockylinux_iso_image_generator_for_testing
Open

Add tool to generate iso images for kvm based tests#6318
lamikr wants to merge 1 commit into
mainfrom
users/lamikr/wip/rockylinux_iso_image_generator_for_testing

Conversation

@lamikr

@lamikr lamikr commented Jul 2, 2026

Copy link
Copy Markdown
Contributor
  • Add a tool to create configured iso-images from linux distros that can be used for kvm based testing
  • currently generator has been tested to generate rockylinux 8.10 based qcow image that can be launched with kvm.
  • Tool will also generate ssh keys that are installed to generated image and can then be used to to login with therock user automatically without password.
  • Therock user has sudo rights to enable the install of apps that may be needed for the testing

Tool was mostly generated by giving instructions and test-copmmands for the codex gpt 5.3. Full logs from me talking to myself and for the gpt 5.3 is in dir:

ai-logs/ai_agent_chat_history_01.txt

Motivation

Motivation for the tool is to be able to run tests that require the execution of fully virtualized tests with images that contains also the linux kernel that is executed. This is needed because there can be errors which only occurs on certain Linux kernels and testing of those type of errors can not be done with the docker because docker images are always using the Linux kernel from the host system instead of running it from the launched Linux image.

Technical Details

Image generator uses following two files to customize the content of generated image:

  • build-config.json
  • templates/rocky8.ks.tmpl --> generated output/rocky8.ks

Test Plan

Purpose of this tool is to create the repeatable tests that requires running the qemu-based vm.

Usage at the moment:

  1. Generate base install image:
    $ cd tests/kvm_tests/linux_iso_image_generator
    $ python build_rockylinux_8_10_iso.py build-config.json
    image that can be used for the testing:
    $ ./testing/qemu_iso_launch.sh

Test Result

Tool is able to generate rockylinux 8.10 based iso-image where the user can log-in with ssh
keys by following the instructions when running the command: ./testing/qemu_iso_launch.sh

Image has not yet tested with the pci-passthrough way to expose real AMD gpu for it which may be
needed by some tests.

- Add a tool to create configured iso-images from
  linux distros that can be used for kvm based testing
- currently generator has been tested to generate
  rockylinux 8.10 based qcow image that can be launched
  with kvm.
- Tool will also generate ssh keys that are installed
  to generated image and can then be used to to
  login with therock user automatically without
  password.
- Therock user has sudo rights to enable the install
  of apps that may be needed for the testing

Motivation for the tool is to be able to run tests
that require the execution of fully virtualized tests
with images that contains also the linux kernel that
is executed. This is needed because there can be errors
which only occurs on certain Linux kernels and testing
of those type of errors can not be done with the docker
because docker images are always using the Linux kernel
from the host system instead of running it from the
launched Linux image.

Tool was mostly generated by giving instructions and
test-copmmands for the codex gpt 5.3. Full logs from
me talking to myself and for the gpt 5.3 is in dir:

   ai-logs/ai_agent_chat_history_01.txt

Usage at the moment:
1) Generate base install image:
$ cd tests/kvm_tests/linux_iso_image_generator
$ python build_rockylinux_8_10_iso.py build-config.json
   image that can be used for the testing:
$ ./testing/qemu_iso_launch.sh

Image generator uses following two files to customize the
content of generated image:
- build-config.json
- templates/rocky8.ks.tmpl --> generated output/rocky8.ks

Signed-off-by: Mika Laitio <mika.laitio@amd.com>
@therock-pr-bot

therock-pr-bot Bot commented Jul 2, 2026

Copy link
Copy Markdown

❌ PR Check — Action Required

Check Status Details
🌿 Branch Name ✅ Pass
📝 PR Title/Description ❌ Fail Error: Title does not follow Conventional Commits style.
Expected: start with a valid type (feat, fix, docs, …).
Desired format: type(optional-scope): short description
───
Error: PR description must reference a JIRA ID, ISSUE ID, or a GitHub closing keyword.
Expected: include a JIRA ID / ISSUE ID line (separator : or -, or omitted; value may be a JIRA key, a number with/without #, or a link), OR a closing keyword + issue reference. Accepted examples:
JIRA ID : TESTAUTO-6039
JIRA ID - #330
JIRA ID #330
ISSUE ID : TESTUTO-3334
ISSUE ID #3334
ISSUE ID - TESTAUTO-3433
ISSUE ID : https://github.com/<org_name>/<repo_name>/issues/1234
Closes #10
Fixes octo-org/octo-repo#100
Resolves: #123
#123
https://github.com/<org_name>/<repo_name>/issues/123
Current: no valid JIRA/ISSUE/closing-keyword reference found
Forbidden Files ✅ Pass
🧪 Unit Test ❌ Fail Error: Source/code files changed without an accompanying unit test.
Expected: add at least one test file named like test_<name>.py / test_<name>.cpp (or <name>_test.*).
Current: code file(s) changed: tests/kvm_tests/linux_iso_image_generator/build_rockylinux_8_10_iso.py, tests/kvm_tests/linux_iso_image_generator/validate-config.py; no test file found
🔎 pre-commit ❌ Fail Error: Check concluded with failure.
🚫 Draft PR 🔜 To Be Enabled
🚩 Feature Flag 🔜 To Be Enabled
📊 Code Coverage 🔜 To Be Enabled

⚠️ 3 policy check(s) failed. Please address the issues above before this PR can be Reviewed.

🚫 Please fix the failed policies

  • ❌ PR Title/Description
  • ❌ Unit Test
  • ❌ pre-commit

The Not ready to Review label was added to this PR. Once all policies pass, the label is removed automatically.

📖 Need help? See the Policy FAQ for details on every check and how to fix failures.

@therock-pr-bot therock-pr-bot Bot added the Not ready to Review PR has unresolved policy failures — reviews blocked label Jul 2, 2026
@therock-pr-bot

therock-pr-bot Bot commented Jul 2, 2026

Copy link
Copy Markdown

🚫 Please fix the failed policies before requesting reviews.

The following policy checks failed:

  • ❌ PR Title/Description
  • ❌ Unit Test

The Not ready to Review label has been added to this PR.
Once all policies pass, the label will be removed automatically.

content = content.replace(f"{{{{{key}}}}}", value)

output_path.parent.mkdir(parents=True, exist_ok=True)
output_path.write_text(content, encoding="utf-8")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Not ready to Review PR has unresolved policy failures — reviews blocked

Projects

Status: TODO

Development

Successfully merging this pull request may close these issues.

2 participants