Thanks for reporting back.
IMHO it is not the code section:
<loader readonly='yes' type='pflash'>/usr/share/AAVMF/AAVMF_CODE.fd</loader>
But the nvram section that causes this - here an example I have:
<nvram
template='/usr/share/AAVMF/AAVMF_VARS.fd'>/tmp/testguest-flash1.img</nvram>
That gets me the vars to the specified directory.
And a "virsh undefine --nvram" removes it.
You didn't have that section about the nvram at all, so I removed mine and
checked the default (at least in my case).
And I found it creating a file similar to your path:
/var/lib/libvirt/qemu/nvram/testguest_VARS.fd
But I also found it to delete it correctly.
$ sudo ls -laF /var/lib/libvirt/qemu/nvram/testguest_VARS.fd
ls: cannot access '/var/lib/libvirt/qemu/nvram/testguest_VARS.fd': No such file
or directory
$ virsh define testguest-fixed.xml; virsh start testguest
Domain testguest defined from testguest-fixed.xml
Domain testguest started
$ virsh dumpxml testguest | grep VARS
<nvram>/var/lib/libvirt/qemu/nvram/testguest_VARS.fd</nvram>
$ sudo ls -laF /var/lib/libvirt/qemu/nvram/testguest_VARS.fd
-rw------- 1 libvirt-qemu kvm 67108864 Jul 12 06:55
/var/lib/libvirt/qemu/nvram/testguest_VARS.fd
$ virsh destroy testguest; virsh undefine --nvram testguest
Domain testguest destroyed
Domain testguest has been undefined
$ sudo ls -laF /var/lib/libvirt/qemu/nvram/testguest_VARS.fd
ls: cannot access '/var/lib/libvirt/qemu/nvram/testguest_VARS.fd': No such file
or directory
You might only see the nvram section in your XML while it is running as it
takes the defaults then.
Therefore - it is the nvram and not the loader section int he xml - I'd assume
the readonly attribute is not important.
Still I wonder why it doesn't work for you.
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1701344
Title:
virt-manager fails to delete
/var/lib/libvirt/qemu/nvram/VMName_VARS.fd after installation is
cancelled.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/virt-manager/+bug/1701344/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs