Red Hat Bugzilla – Bug 807147
virsh snapshot-create --disk-only failed
Last modified: 2013-10-20 17:45:35 EDT
Description of problem: virsh snapshot-create q --disk-only error: internal error unable to execute QEMU command 'transaction': Invalid JSON syntax Version-Release number of selected component (if applicable): libvirt-0.9.10-8.el6.x86_64 qemu-kvm-0.12.1.2-2.265.el6rhev.x86_64 How reproducible: 100% Steps to Reproduce: 1.# virsh snapshot-create q --disk-only error: internal error unable to execute QEMU command 'transaction': Invalid JSON syntax 2. ... <disk type='file' device='disk'> <driver name='qemu' type='qcow2' cache='none'/> <source file='/var/lib/libvirt/images/mig-qcow2.img'/> <target dev='vda' bus='virtio'/> <alias name='virtio-disk0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> </disk> ... Additional info:
libvirt-0.9.10-7.el6.x86_64 can reproduce this bug but libvirt-0.9.10-6.el6.x86_64 can not so it is a regression .
Caused by commit d42a2ffc07ab9bb569819f0a15b42f1017b5f330. Our JSON string generator generates an invalid string if the argument is NULL. Patch proposed upstream: http://www.redhat.com/archives/libvir-list/2012-March/msg01199.html
In POST: http://post-office.corp.redhat.com/archives/rhvirt-patches/2012-March/msg02269.html
Verify this bug : libvirt-0.9.10-9.el6.x86_64 qemu-kvm-0.12.1.2-2.265.el6rhev.x86_64 # virsh snapshot-create f16 --disk-only Domain snapshot 1332999912 created after snapshot guest xml <disk type='file' device='disk'> <driver name='qemu' type='qcow2' cache='none'/> <source file='/var/lib/libvirt/images/f16qcow2.1332999912'/> <target dev='vda' bus='virtio'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> </disk>
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHSA-2012-0748.html