Verification done on jammy-proposed. --- Part 1: comment #2, libvirt starts without errors, and can list and manage the domain. Part 2: comment #5, libvirt restarts without errors 100 times with 10 domains. Environment: --- LXD virtual machine lxc launch --vm ubuntu:jammy lp2059272-jammy lxc exec lp2059272-jammy -- su - ubuntu Enable -proposed sudo add-apt-repository -yp proposed cat < (gdb) p xmlopt.parent.parent_instance $2 = {g_type_instance = {g_class = 0x7fe02806cf20}, ref_count = 1, qdata = 0x0} Let the cleanup function and shutdown path finish (gdb) t 1 (gdb) c & (gdb) t 25 Check the formatter/options again; it is *STILL* referenced: (gdb) p xmlopt.privateData.format $3 = (virDomainXMLPrivateDataFormatFunc) 0x7fe0176b4da0 (gdb) p xmlopt.parent.parent_instance $4 = {g_type_instance = {g_class = 0x7fe02806cf20}, ref_count = 1, qdata = 0x0} Check the VM status XML *before* the save function finishes: $ sudo grep -e ' Let the save function continue, and libvirt finishes shutting down: (gdb) c ... [Inferior 1 (process 3405) exited normally] Check the VM status XML *after*: $ sudo grep -e ' It *CONTINUES* to have the 'monitor path' tag/field. Now, the next time libvirtd starts, it *CORRECTLY* parses that XML: $ sudo systemctl start libvirtd.service $ journalctl -b -u libvirtd.service | tail | grep error $ And libvirt is now aware of the domain, and can manage it: $ virsh list Id Name State ------------------------- 1 test-vm running $ virsh destroy test-vm Domain 'test-vm' destroyed Part 2: --- $ for i in {1..100}; do echo restart $i; sudo systemctl restart libvirtd.service; sleep 10; done restart 1 restart 2 restart 3 ... restart 98 restart 99 restart 100 No errors: $ journalctl -b -u libvirtd.service | grep -v -e 'systemd' -e 'hostname:' | cut -d' ' -f7- | sort | uniq -c | sort -rn 106 /var/lib/libvirt/dnsmasq/default.hostsfile 106 /var/lib/libvirt/dnsmasq/default.addnhosts - 0 names 106 /etc/hosts - 8 names