Skip to content

qemu_template: fix -S flag when '-- -snapshot' was provided - #4311

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

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

Conversation

@t-lo

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

Copy link
Copy Markdown
Member

This change fixes a corner case in #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.

This PR restores the previous behaviour while retaining the new -S option.

This change fixes a corner case in #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>
@t-lo
t-lo requested a review from a team as a code owner October 8, 2026 14:35
Copilot AI balanced review requested due to automatic review settings October 8, 2026 14:35

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

The conditional drive options correctly allow global -snapshot to take effect without regressing -S.

0 open findings

What changed in this PR

Restores QEMU’s forwarded -snapshot behavior while preserving wrapper-level -S support.

Changes:

  • Omits per-drive snapshot settings by default.
  • Appends snapshot=on to writable drives when -S is used.
File Description
build_library/​qemu_template.sh Makes per-drive snapshot configuration conditional.

🧠 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 ac4d5bd into main Oct 8, 2026
3 of 4 checks passed
@t-lo
t-lo deleted the t-lo/qemu-wrapper-snapshot-fix branch October 8, 2026 14:48

This branch is waiting to be deployed

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