virt-manager fails to delete /var/lib/libvirt/qemu/nvram/VMName_VARS.fd after installation is cancelled.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
virt-manager (Ubuntu) |
Expired
|
Undecided
|
Unassigned |
Bug Description
Hello,
When a VM using UEFI is created through the wizard and the wizard is cancelled in the "customize hardware" step an artifact is left behind in /var/lib/
Steps:
1. Create an x86_64 VM named "TEST123" and make a mistake: Supply AARCH64 firmware. VM startup will fail with an error. Cancel installation and the VM is not in the list.
2. Do step 1 over but give it correct firmware. The VM will fail to startup with a firmware related failure. The exception names the file /var/lib/
3. Delete /var/lib/
4. Repeat step 2. It works.
This could make a person crazy for a while and at first glance appears to be a firmware bug. I was saved by my love of deleting things.
Thank you!
ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: virt-manager 1:1.3.2-
ProcVersionSign
Uname: Linux 4.4.0-79-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.6
Architecture: amd64
CurrentDesktop: Unity
Date: Thu Jun 29 11:46:24 2017
EcryptfsInUse: Yes
InstallationDate: Installed on 2017-05-23 (37 days ago)
InstallationMedia: Ubuntu 16.04 LTS "Xenial Xerus" - Release amd64 (20160420.1)
PackageArchitec
SourcePackage: virt-manager
UpgradeStatus: No upgrade log present (probably fresh install)
Very interesting, thank you Mike for reporting that.
I never drove this through virt-mananger, but I've seen simlar through the commandline.
I happened to get it working via:
$ virsh undefine --nvram testguest
Now maybe the cancel/delete from virt-manager does not do so.
Could you try the following:
1. if the guest is still defined after that cancel undefine it in commandline with
$ virsh undefine --nvram TEST123
Check if that did remove the file
2. If the cancel did remove the definition please try to find a way to abort it hard. We need to
find out if virt-manager needs to call differently or if in your case the "undefine including
nvram" fails to remove the file.
Once you aborted do the undefine as mentioned above and check if the file was removed.
If the file was not removed we might also want to check dmesg for apparmor Denies.
Also there is this code in virt-manager:
"VIR_DOMAIN_ UNDEFINE_ SNAPSHOTS_ METADATA" , 0) UNDEFINE_ MANAGED_ SAVE", 0) xmlobj( ).os.loader_ ro is True and
self. get_xmlobj( ).os.loader_ type == "pflash"):
flags |= getattr(libvirt, "VIR_DOMAIN_ UNDEFINE_ NVRAM", 0)
self. _backend. undefineFlags( flags)
if force:
flags |= getattr(libvirt,
flags |= getattr(libvirt, "VIR_DOMAIN_
if (self.get_
try:
That reads like the right thing, but it depends on the force flag.
Not sure if that is set on the path you trigger.