the vm xml will be existed when the vm is undefined after started.
blockcommit interface also has the bug with above.
Step1:prepare a vm,eg:test1,start it and undefined
Step2: virsh snapshot-create-as test1 --disk-only --no-metadata
Step3:ls /etc/libvirt/qemu/test1.xml,then it will be exist here
Signed-off-by: Bobo Du <dubobo(a)didichuxing.com
---
src/qemu/qemu_driver.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index fb0d4a8..d977922 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -7570,6 +7570,7 @@ qemuDomainUndefineFlags(virDomainPtr dom,
if (!virDomainObjIsActive(vm))
qemuDomainRemoveInactive(driver, vm);
+ virDomainDefFree(vm->newDef);
ret = 0;
endjob:
qemuDomainObjEndJob(driver, vm);
--
1.8.3.1