Revision d967b2f1
b/blockdev.c | ||
---|---|---|
568 | 568 |
int do_snapshot_blkdev(Monitor *mon, const QDict *qdict, QObject **ret_data) |
569 | 569 |
{ |
570 | 570 |
const char *device = qdict_get_str(qdict, "device"); |
571 |
const char *filename = qdict_get_try_str(qdict, "snapshot_file");
|
|
571 |
const char *filename = qdict_get_try_str(qdict, "snapshot-file");
|
|
572 | 572 |
const char *format = qdict_get_try_str(qdict, "format"); |
573 | 573 |
BlockDriverState *bs; |
574 | 574 |
BlockDriver *drv, *old_drv, *proto_drv; |
... | ... | |
577 | 577 |
char old_filename[1024]; |
578 | 578 |
|
579 | 579 |
if (!filename) { |
580 |
qerror_report(QERR_MISSING_PARAMETER, "snapshot_file");
|
|
580 |
qerror_report(QERR_MISSING_PARAMETER, "snapshot-file");
|
|
581 | 581 |
ret = -1; |
582 | 582 |
goto out; |
583 | 583 |
} |
b/hmp-commands.hx | ||
---|---|---|
840 | 840 |
|
841 | 841 |
{ |
842 | 842 |
.name = "snapshot_blkdev", |
843 |
.args_type = "device:B,snapshot_file:s?,format:s?",
|
|
843 |
.args_type = "device:B,snapshot-file:s?,format:s?",
|
|
844 | 844 |
.params = "device [new-image-file] [format]", |
845 | 845 |
.help = "initiates a live snapshot\n\t\t\t" |
846 | 846 |
"of device. If a new image file is specified, the\n\t\t\t" |
b/qmp-commands.hx | ||
---|---|---|
694 | 694 |
EQMP |
695 | 695 |
|
696 | 696 |
{ |
697 |
.name = "blockdev-snapshot-sync", |
|
698 |
.args_type = "device:B,snapshot-file:s?,format:s?", |
|
699 |
.params = "device [new-image-file] [format]", |
|
700 |
.user_print = monitor_user_noop, |
|
701 |
.mhandler.cmd_new = do_snapshot_blkdev, |
|
702 |
}, |
|
703 |
|
|
704 |
SQMP |
|
705 |
blockdev-snapshot-sync |
|
706 |
---------------------- |
|
707 |
|
|
708 |
Synchronous snapshot of a block device. snapshot-file specifies the |
|
709 |
target of the new image. If the file exists, or if it is a device, the |
|
710 |
snapshot will be created in the existing file/device. If does not |
|
711 |
exist, a new file will be created. format specifies the format of the |
|
712 |
snapshot image, default is qcow2. |
|
713 |
|
|
714 |
Arguments: |
|
715 |
|
|
716 |
- "device": device name to snapshot (json-string) |
|
717 |
- "snapshot-file": name of new image file (json-string) |
|
718 |
- "format": format of new image (json-string, optional) |
|
719 |
|
|
720 |
Example: |
|
721 |
|
|
722 |
-> { "execute": "blockdev-snapshot", "arguments": { "device": "ide-hd0", |
|
723 |
"snapshot-file": |
|
724 |
"/some/place/my-image", |
|
725 |
"format": "qcow2" } } |
|
726 |
<- { "return": {} } |
|
727 |
|
|
728 |
EQMP |
|
729 |
|
|
730 |
{ |
|
697 | 731 |
.name = "balloon", |
698 | 732 |
.args_type = "value:M", |
699 | 733 |
.params = "target", |
Also available in: Unified diff