Bug 807147 - virsh snapshot-create --disk-only failed
Summary: virsh snapshot-create --disk-only failed
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.4
Hardware: x86_64
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Eric Blake
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-03-27 07:44 UTC by Huang Wenlong
Modified: 2013-10-20 21:45 UTC (History)
8 users (show)

Fixed In Version: libvirt-0.9.10-9.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-06-20 06:50:56 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2012:0748 0 normal SHIPPED_LIVE Low: libvirt security, bug fix, and enhancement update 2012-06-19 19:31:38 UTC

Description Huang Wenlong 2012-03-27 07:44:33 UTC
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 08:04:02 UTC
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 12:01:27 UTC
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 05:47:03 UTC
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 06:50:56 UTC
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.