Repository navigation
Instance: Mount VM volume when accessing UEFI vars while stopped - #19302
Open
LubabaKhalid wants to merge 1 commit into
Open
LubabaKhalid wants to merge 1 commit into
LubabaKhalid wants to merge 1 commit into
Conversation
…stopped The NVRAM file lives on the VM's config volume which, on storage drivers like ZFS, is only mounted while the VM is running. Reading or updating UEFI variables on a stopped VM therefore accessed the empty mountpoint instead: changes were silently lost once the volume got mounted on start, and the leftover file made deleting the VM fail. Mount the volume for the duration of the operation, as already done when regenerating the NVRAM on boot.mode changes. Signed-off-by: Lubaba Khalid <129605617+LubabaKhalid@users.noreply.github.com>
Contributor
Author
|
@mihalicyn could you take a look when you have a moment? This mounts the VM volume when UEFI variables are read or updated on a stopped VM, which fixes the lost changes on ZFS reported in the issue. Thanks! |
tomponline
pushed a commit
that referenced
this pull request
Oct 19, 2026
Labels added by actions/labeler use GITHUB_TOKEN, and events created that way do not start other workflows. The domain reviewer job therefore never saw the labels of PRs labeled by the labeler, and the domain label check could read the labels before the labeler applied them and add d/missing. Call both jobs from triage after the labeler has run. The label check no longer runs on opened and synchronize directly. Seen on #19302, an external PR that got labels but no reviewers. Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #19223.
The NVRAM file lives on the VM's config volume which, on storage drivers like ZFS, is only mounted while the VM is running.
lxc config uefi get/seton a stopped VM therefore read and wrote the empty mountpoint instead: changes were silently lost once the volume got mounted on start, and the leftover file madelxc deletefail with "directory not empty".UEFIVars()andUEFIVarsUpdate()now mount the volume for the duration of the operation when the VM is stopped, as is already done when regenerating the NVRAM onboot.modechanges.The existing
test/snap/efi-vmtest covers the set/unset flow but uses adirpool, where the config volume is not a separate mount. I'm happy to extend it with a ZFS or LVM pool if that's wanted.Checklist