Bug 807147 - virsh snapshot-create --disk-only failed
virsh snapshot-create --disk-only failed
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt (Show other bugs)
6.4
x86_64 Linux
high Severity high
: rc
: ---
Assigned To: Eric Blake
Virtualization Bugs
: Regression
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-27 03:44 EDT by Huang Wenlong
Modified: 2013-10-20 17:45 EDT (History)
8 users (show)

See Also:
Fixed In Version: libvirt-0.9.10-9.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-06-20 02:50:56 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Huang Wenlong 2012-03-27 03:44:33 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:
Comment 2 Huang Wenlong 2012-03-27 04:04:02 EDT
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 .
Comment 3 Peter Krempa 2012-03-27 08:01:27 EDT
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
Comment 5 Huang Wenlong 2012-03-29 01:47:03 EDT
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>
Comment 7 errata-xmlrpc 2012-06-20 02:50:56 EDT
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

Note You need to log in before you can comment on or make changes to this bug.