vmupdate: add qvm-template-upgrade - #213
Conversation
ben-grande
left a comment
There was a problem hiding this comment.
Yay, started. As I've done a review now, I will receive a notification every time you commit. Let me know when you need another look or have doubts by mentioning me.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #213 +/- ##
==========================================
- Coverage 71.36% 68.09% -3.28%
==========================================
Files 12 34 +22
Lines 1383 4604 +3221
==========================================
+ Hits 987 3135 +2148
- Misses 396 1469 +1073 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
PipelineRetryFailed |
|
Some tests are not enabled on this repo, such as mypy, black and pylint. See this as an example: https://github.com/QubesOS/qubes-core-admin/blob/main/.gitlab-ci.yml. Can you create a separate PR to enable those checks? |
|
Sure, will do |
|
We can squash here if it's looks fine. Will also have to rebase as this is 24 commits behind. |
|
Looks fine to squash. |
71dee9e to
6c3d431
Compare
|
Oh no, commit message in the other PR closed it ... |
|
I see a conflict here - CI will not run until it's resolved. |
16b99f5 to
f1f8fc1
Compare
ben-grande
left a comment
There was a problem hiding this comment.
I have taken a look through the new code. Thanks for the progress, I like to see it evolving. Just minor review though
ad97dca to
a0289a7
Compare
|
Can you share more details of what fails on cleanup? |
|
When I tried upgrading fedora 41 -> 42 there was a cleanup failure which happened after the successful version upgrade. logs as shared privately on tuesday: https://gist.github.com/nihalxkumar/01fb990deab3960cb28d680773bb1089#file-upgrade42-log-L48-L55 we can see https://gist.github.com/nihalxkumar/0e4edccb4f4409b1a4daf5c44b6f576f After
|
|
But we can't ignore all cleanup failures. We don't know what is causing it, so this needs to be investigated. |
0a8f8ac to
80e3d99
Compare
parulin
left a comment
There was a problem hiding this comment.
I have some suggestion for better integration with the rest of the docs. If you have any question, feel free to ask.
This file is in doc/tools instead of doc/manpages, why?
|
As I understand, this tool should also be promoted in qubes-doc, in the |
|
@parulin you are mistaking this repository as qubes-core-admin-client |
80e3d99 to
c3f550e
Compare
|
Debian upgrade end-to-end successful https://gist.github.com/nihalxkumar/3f64e3a056e9ce367e9787d5bd94b9df |
| AUTHORS | ||
| ======= | ||
| | Nihal Kumar <nihalxkumar at tutamail dot com> | ||
| | Ben Grande <ben at invisiblethingslab dot com> No newline at end of file |
There was a problem hiding this comment.
Not sure how credit works here, but it could be worth also adding @kennethrrosen as the creator of the tool that lead to this. 🤔
There was a problem hiding this comment.
Kenneth's script only served as a conceptual inspiration. I have no problems mentioning this but how should I do it?
There was a problem hiding this comment.
Exactly. That's in the sense I meant. Maybe:
| | Ben Grande <ben at invisiblethingslab dot com> | |
| | Ben Grande <ben at invisiblethingslab dot com> | |
| | Kenneth R. Rosen <kennethrrosen at proton.me> |
There was a problem hiding this comment.
|
Hi. Could you please rebase your PR from the main branch to fix the conflicts? |
Add a --version-upgrade mode to the in-VM agent so a qube can be moved to the next major distribution release. The dnf backend distro-syncs to the target releasever; the apt backend updates, rewrites source codenames, and dist-upgrades. Both confirm os-release before reporting success.
The agent emits a final explicit 100% even when callback progress already reached it, causing a bogus "err: 100.00" line. Drop the duplicate 100 milestone after progress has finished.
Upgrade a clone of a TemplateVM or StandaloneVM to the next distribution release, leaving the original qube untouched.
Document the options, the clone name derivation, and which template-* features the tool rewrites, including why the inherited epoch, version and release make qvm-template list the upgraded clone as upgradeable.
Progress hit 100% before post-transaction scriptlets finished, making the bar appear frozen for the remaining work. Cap package progress at 97% and advance asymptotically through post-transaction scriptlets. Report 100% after qubes.PostInstall so the bar stays responsive until everything is done.
During release upgrades the root volume briefly holds both releases, which can trigger a spurious disk-space warning toast. Suppress disk-space-not-notify on the clone during the upgrade and restore it afterwards.
Each Debian release-upgrade step drove the progress bar to 100%, silencing later steps. Give each step its own weighted slice of the bar so progress stays proportional throughout the upgrade.
c3f550e to
5a78c27
Compare
4c27ce0 to
3b2de76
Compare
3b2de76 to
721ebef
Compare
OpenQA test summaryComplete test suite and dependencies: https://openqa.qubes-os.org/tests/overview?distri=qubesos&version=4.3&build=2026082500-devel&flavor=pull-requests Test run included the following:
New failures, excluding unstableCompared to: https://openqa.qubes-os.org/tests/overview?distri=qubesos&version=4.3&build=2026050504-devel&flavor=update
Failed tests1 failures
Fixed failuresCompared to: https://openqa.qubes-os.org/tests/176874#dependencies Unstable testsDetails
Performance TestsPerformance degradation:No issues Remaining performance tests:No remaining performance tests |


This PR introduces the
qvm-template-upgradedom0 command-line utility, that performs an in-place N -> N+1 distribution upgrade of Debian and Fedora TemplateVM or StandaloneVMfixes: QubesOS/qubes-issues#8605
GSoC 2026 project: Automate Template Version Upgrade