Bug 676982 - RFE: no qmp command for live snapshot
RFE: no qmp command for live snapshot
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
6.1
Unspecified Unspecified
medium Severity medium
: rc
: ---
Assigned To: Jes Sorensen
Virtualization Bugs
: FutureFeature
Depends On:
Blocks: Rhel5KvmTier3 693510
  Show dependency treegraph
 
Reported: 2011-02-12 03:26 EST by Shirley Zhou
Modified: 2015-03-04 19:52 EST (History)
7 users (show)

See Also:
Fixed In Version: qemu-kvm-0.12.1.2-2.173.el6
Doc Type: Enhancement
Doc Text:
No technote needed as this feature was pulled from 6.2
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-12-06 10:44:25 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Shirley Zhou 2011-02-12 03:26:27 EST
Description of problem:
There should be qmp command for live snapshot. we have qemu monitor command (qemu) snapshot_blkdev [device] [new-image-file] [format].

Version-Release number of selected component (if applicable):
qemu-kvm-0.12.1.2-2.144.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1.start guest with qmp
-qmp tcp:0:4444,server

2.query all qmp commands
{"execute":"query-commands"}


  
Actual results:
no related live snapshot commands

Expected results:
There should be qmp command for live snapshot.

Additional info:
Comment 2 Jes Sorensen 2011-02-14 09:21:23 EST
Jiri,

Do you need this for libvirt? In which case, what is the timeframe
for it?

Thanks,
Jes
Comment 4 Jes Sorensen 2011-04-19 04:56:07 EDT
Patch posted for upstream QEMU. Please review it to make sure it does
what you need.
Comment 10 Qunfang Zhang 2011-07-31 22:43:31 EDT
Verified on qemu-kvm-0.12.1.2-2.175.el6, have "blockdev-snapshot-sync" command already and the command works well.

Steps:
1. Boot a guest
 /usr/libexec/qemu-kvm -m 2G -smp 2 -cpu cpu64-rhel6,+x2apic -usbdevice tablet -drive file=/home/RHEL-Server-6.1-64-virtio.qcow2,format=qcow2,if=none,id=drive-ide0-0-0,werror=stop,rerror=stop,cache=none -device virtio-blk-pci,drive=drive-ide0-0-0,id=ide0-0-0 -netdev tap,id=hostnet0,script=/etc/qemu-ifup -device e1000,netdev=hostnet0,mac=00:10:2a:25:1a:58,bus=pci.0,addr=0x6 -boot c -uuid 8d4fefcc-2f16-4de3-9005-fb1d651c732f -rtc-td-hack -no-kvm-pit-reinjection -monitor stdio -qmp tcp:0:4444,server,nowait -name rhel6.1 -vnc :10 -device virtio-balloon-pci,bus=pci.0,id=balloon0

2. Using dd to create a file inside base image.

3. {"execute":"blockdev-snapshot-sync","arguments":{"device":"drive-ide0-0-0","snapshot-file":"/home/sn-1","format":"qcow2"}}
{"return": {}}

4. {"execute":"query-block"}
{"return": [{"device": "drive-ide0-0-0", "locked": false, "removable": false, "inserted": {"ro": false, "drv": "qcow2", "backing_file": "/home/RHEL-Server-6.1-64-virtio.qcow2", "encrypted": false, "file": "/home/sn-1"}, "type": "hd"}, {"device": "ide1-cd0", "locked": false, "removable": true, "type": "cdrom"}, {"device": "floppy0", "locked": false, "removable": true, "type": "floppy"}, {"device": "sd0", "locked": false, "removable": true, "type": "floppy"}]}

5.Check the file created in base image, it exists. Create another file "file_sn1".

6. (qemu)commmit drive-ide0-0-0 or
{ "execute": "human-monitor-command","arguments": { "command-line": "commit drive-ide0-0-0"}}

7. shutdown guest and boot base image again, the file "file_sn1" exists.

8. Re-test with IDE block again, the result is the same as virtio.

So, this bug is verified pass.
Comment 12 Jes Sorensen 2011-11-18 10:38:13 EST
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
No technote needed as this feature was pulled from 6.2
Comment 13 errata-xmlrpc 2011-12-06 10:44:25 EST
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-2011-1531.html

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