[libvirt] [PATCH] Make saving domain XML more robust