Skip to content

qemu_template: add -S flag for snapshot mode - #4310

Merged
t-lo merged 1 commit into
mainfrom
t-lo/qemu-wrapper-add-snapshot-mode
Oct 8, 2026
Merged

t-lo merged 1 commit into
mainfrom
t-lo/qemu-wrapper-add-snapshot-mode

Conversation

@t-lo

@t-lo t-lo commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

This change adds the -S flag to Flatcar's qemu wrapper, thoroughly integrating qemu's snapshot mode across all disk devices in the wrapper.

@t-lo
t-lo requested a review from a team as a code owner October 8, 2026 12:27
Copilot AI balanced review requested due to automatic review settings October 8, 2026 12:27

@chewi chewi left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It also removes format=qcow from PFlash drives as the files backing these drives are not usually provided in qcow format.

Ours are for quite a while now. Relying on the autodetection is discouraged.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The short flag conflicts with QEMU’s existing -S behavior, while raw writable pflash images may have restricted writes.

2 open findings
What changed in this PR

Adds snapshot-mode support to the QEMU wrapper and adjusts pflash format handling.

Changes:

  • Adds -S/-snapshot wrapper options.
  • Enables snapshots for writable drives and pflash.
  • Removes hardcoded qcow2 pflash formats.
File Description
build_library/​qemu_template.sh Adds snapshot configuration to QEMU drive arguments.

🧠 Review effort: Balanced


Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.

Comment thread build_library/qemu_template.sh
Comment thread build_library/qemu_template.sh Outdated
@t-lo
t-lo force-pushed the t-lo/qemu-wrapper-add-snapshot-mode branch from 9674b1f to 77d4f4e Compare October 8, 2026 12:48
Copilot AI balanced review requested due to automatic review settings October 8, 2026 12:48
This change adds the -S flag to Flatcar's qemu wrapper, thoroughly
integrating qemu's snapshot mode across all disk devices in the wrapper.

Signed-off-by: Thilo Fromm <thilofromm@microsoft.com>
@t-lo
t-lo force-pushed the t-lo/qemu-wrapper-add-snapshot-mode branch from 77d4f4e to 7235073 Compare October 8, 2026 12:49
@t-lo

t-lo commented Oct 8, 2026

Copy link
Copy Markdown
Member Author

It also removes format=qcow from PFlash drives as the files backing these drives are not usually provided in qcow format.

Ours are for quite a while now. Relying on the autodetection is discouraged.

Makes sense; I removed that change.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Passthrough drives remain writable in snapshot mode, and the stated pflash format removal is missing.

3 open findings
1 resolved since last review

🧠 Review effort: Balanced


Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.

Comment thread build_library/qemu_template.sh
Comment thread build_library/qemu_template.sh
Copilot AI balanced review requested due to automatic review settings October 8, 2026 12:51

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

Snapshot behavior is consistently applied to all wrapper-managed writable block devices.

2 open findings
1 resolved since last review

🧠 Review effort: Balanced


Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.

@t-lo
t-lo merged commit 0d53e2a into main Oct 8, 2026
3 of 4 checks passed
@t-lo
t-lo deleted the t-lo/qemu-wrapper-add-snapshot-mode branch October 8, 2026 13:13
gbg3 pushed a commit to CerberusNetworks/flatcar-upstream that referenced this pull request Oct 8, 2026
This change fixes a corner case in flatcar#4310 when the new '-S' option
introduced in that PR was not provided, but the classic '-- -snapshot'
pass-through option is used. Since the PR explicitly sets 'snapshot=off'
on all disks individually, and since per-disk options override global
options, '-- -snapshot' is effectively ignored.

Signed-off-by: Thilo Fromm <thilofromm@microsoft.com>

This branch is waiting to be deployed

1 waiting deployment
development — 72350736 Waiting Oct 8, 2026 by t-lo via Wait for approval #5981
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.

3 participants