VM: Fix nvram file update from 2MB OVMF and CSM mode #14555
Merged
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.
Because the LXD snap no longer ships these files they were not being detected as candidates which meant the logic to detect their usage and trigger an upgrade was not working. LXD 6.1 <= didn't check for the existence of the firmware candidates which meant the upgrade logic still worked.
Instead change the logic to resolve the nvram target path to the OVMF vars file and then perform the 2MB/CSM logic on the target path file name instead.
Also move this out of
generateQemuConfigFile
and combine with the existing logic instart
to detect when the nvram file needs to be (re)generated.