Skip to content

feat: add guest disk storage for QEMU ExporterSet pods - #928

Draft
mangelajo wants to merge 1 commit into
jumpstarter-dev:mainfrom
mangelajo:feat/924-qemu-exporterset-storage
Draft

feat: add guest disk storage for QEMU ExporterSet pods#928
mangelajo wants to merge 1 commit into
jumpstarter-dev:mainfrom
mangelajo:feat/924-qemu-exporterset-storage

Conversation

@mangelajo

Copy link
Copy Markdown
Member

Summary

  • Add storageClassName on VirtualTargetClass (with ExporterSet override) so QEMU ExporterSet pods can provision flashable guest disks at /disk
  • When a StorageClass is set, create a per-exporter PVC; otherwise use sized emptyDir and set ephemeral-storage requests/limits for scheduler accounting
  • Update the QEMU sidecar driver to flash/boot from /disk (sockets stay on /shared), including cidata/firmware path fixes for remote exec

Closes #924
Relates to: PITCREW-501

Test plan

  • Unit: go test ./api/virtualtarget/v1alpha1/ ./internal/exporterset/disk/ ./internal/exporterset/provisioners/qemu/
  • Apply kind sample without storageClassName; confirm Pod has disk emptyDir + ephemeral-storage requests/limits
  • Apply with storageClassName set; confirm PVC disk-<exporter> is created, owned by Exporter, and mounted at /disk
  • Confirm ExporterSet.spec.storageClassName overrides / clears the VTC value
  • Manual: lease → flash image → power on → serial/console reachable
  • Confirm ExitAndReplace deletes Pod + PVC together

Made with Cursor

Provision flashable /disk via PVC when storageClassName is set, otherwise
emptyDir with ephemeral-storage accounting so lease → flash → boot can work.

Co-authored-by: Cursor <cursoragent@cursor.com>
@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 1d64bc9a-b3d3-4efa-baa9-57217f58d0ca

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@bennyz

bennyz commented Jul 29, 2026

Copy link
Copy Markdown
Member

@mangelajo maybe group it all under parameters?
so it's

parameters:
  storage:
    storageClassName: ...
    resources: ...

@mangelajo

Copy link
Copy Markdown
Member Author

@mangelajo maybe group it all under parameters? so it's

parameters:
  storage:
    storageClassName: ...
    resources: ...

Yes, I think that makes more sense, I thought about it when I was working on it, and thought the feature could be useful to other exporterset controllers, but we can make all the behavior reusable by common functions, and it's just a parameter.

We don't need any special checking at API level, and many exportersets don't even care about the storage classes at all.

👍

Thanks benny

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.

Add storage/disk support for QEMU ExporterSet virtual targets

2 participants