Bug 676982 - RFE: no qmp command for live snapshot
RFE: no qmp command for live snapshot
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
Unspecified Unspecified
medium Severity medium
: rc
: ---
Assigned To: Jes Sorensen
Virtualization Bugs
: FutureFeature
Depends On:
Blocks: 693510 Rhel5KvmTier3
  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-
Doc Type: Enhancement
Doc Text:
No technote needed as this feature was pulled from 6.2
Story Points: ---
Clone Of:
Last Closed: 2011-12-06 10:44:25 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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):

How reproducible:

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

2.query all qmp 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

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

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-, have "blockdev-snapshot-sync" command already and the command works well.

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.


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