Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VM: Fix nvram file update from 2MB OVMF and CSM mode #14555

Merged
merged 1 commit into from
Nov 29, 2024

Conversation

tomponline
Copy link
Member

@tomponline tomponline commented Nov 29, 2024

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 in start to detect when the nvram file needs to be (re)generated.

@tomponline tomponline self-assigned this Nov 29, 2024
… and CSM mode

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.

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 in `start`
to detect when the nvram file needs to be (re)generated.

Signed-off-by: Thomas Parrott <[email protected]>
Copy link
Member

@MusicDin MusicDin left a comment

Choose a reason for hiding this comment

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

Very nice!

@tomponline tomponline merged commit dc7b9b1 into canonical:main Nov 29, 2024
27 checks passed
@tomponline tomponline deleted the tp-ovmf-update branch November 29, 2024 15:54
tomponline added a commit to tomponline/lxd-pkg-snap that referenced this pull request Nov 29, 2024
Fix for canonical/lxd#14555

Signed-off-by: Thomas Parrott <[email protected]>
tomponline added a commit to canonical/lxd-pkg-snap that referenced this pull request Nov 29, 2024
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