Skip to content

B #8190: Store auto-EFI NVRAM in VM system dir and check Domain not found in kvm/cancel - #8192

Open
trukhinyuri wants to merge 1 commit into
OpenNebula:masterfrom
trukhinyuri:fix/kvm-cancel-nvram
Open

trukhinyuri wants to merge 1 commit into
OpenNebula:masterfrom
trukhinyuri:fix/kvm-cancel-nvram

Conversation

@trukhinyuri

@trukhinyuri trukhinyuri commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Description

Fixes #8190.

  • In LibVirtDriver::deployment_description_kvm (src/vmm/LibVirtDriverKVM.cc), emit <nvram> pointing to <system_dir>/<vm_name>_VARS.fd for is_efi_auto (FIRMWARE="UEFI") just like is_uefi, and skip the manual OVMF_NVRAM copy in src/vmm_mad/remotes/kvm/deploy when /domain/os/@firmware is efi. This lets libvirt firmware autoselection populate the NVRAM file inside the VM system directory so tm/delete cleans it up as oneadmin instead of leaving files in /var/lib/libvirt/qemu/nvram/.
  • In src/vmm_mad/remotes/kvm/cancel, check DOMINFO_OUT for Domain not found instead of returning 0 on any virsh dominfo error so transient libvirtd failures are retried rather than treated as successful domain removal.

Branches to which this PR applies

  • master
  • one-7.0

  • Check this if this PR should not be squashed

Copilot AI balanced review requested due to automatic review settings October 14, 2026 16:55

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.

🟡 Changes recommended

The NVRAM deletion lacks the privileges required to remove libvirt-owned files.

1 open finding
What changed in this PR

Improves KVM cancellation reliability and adds UEFI NVRAM cleanup.

Changes:

  • Retries transient virsh dominfo failures.
  • Detects genuinely missing domains.
  • Removes stale per-domain NVRAM files.
File Description
src/​vmm_mad/​remotes/​kvm/​cancel Refines domain detection and adds NVRAM cleanup.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/vmm_mad/remotes/kvm/cancel Resolved
…main not found in kvm/cancel

- In LibVirtDriverKVM.cc, emit <nvram> pointing to
  <system_dir>/<vm_name>_VARS.fd for auto-selected EFI firmware (FIRMWARE=UEFI)
  just like explicit UEFI firmware paths, and skip manual OVMF_NVRAM copying in
  vmm_mad/remotes/kvm/deploy when /domain/os/@firmware is 'efi' so libvirt
  autoselection populates the NVRAM file inside the VM system directory where
  tm/delete cleans it up as oneadmin.
- In vmm_mad/remotes/kvm/cancel, check that virsh dominfo output matches
  'Domain not found' before treating a non-zero exit code as success.

Signed-off-by: Iurii Trukhin <yuri@trukhin.com>
@trukhinyuri trukhinyuri changed the title B #8190: Check Domain not found and clean up UEFI NVRAM in kvm/cancel B #8190: Store auto-EFI NVRAM in VM system dir and check Domain not found in kvm/cancel Oct 14, 2026
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.

vmm/kvm/cancel masks transient virsh dominfo errors and leaves transient UEFI NVRAM files

2 participants