container: Pass --nvram option to virsh undefine

- Similar to the way we did in another place. Otherwise, the command won't work
on UEFI based VMs.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
Sunil Mohan Adapa 2025-08-29 15:48:27 -07:00
parent cc347258b5
commit 0081d1ffeb
No known key found for this signature in database
GPG Key ID: 43EA1CFF0AA7C5F2

View File

@ -1416,7 +1416,7 @@ class VM(Machine):
logger.info('Running `virsh destroy %s`', self.machine_name)
try:
self._virsh(['undefine', self.machine_name],
self._virsh(['undefine', '--nvram', self.machine_name],
stdout=subprocess.DEVNULL)
except subprocess.CalledProcessError:
pass