path: root/hmp-commands.hx
diff options
authorPaolo Bonzini <pbonzini@redhat.com>2012-10-18 16:49:24 +0200
committerKevin Wolf <kwolf@redhat.com>2012-10-24 10:26:20 +0200
commitd9b902db3fb71fdcdfbb2aa9cc94a410dee864e5 (patch)
tree9102d91ad88014e5c04f0d26cdf0c7a991dd3adb /hmp-commands.hx
parent893f7ebafe4e8afc0ce4dbd9e64b3752f3036bbb (diff)
qmp: add drive-mirror command
This adds the monitor commands that start the mirroring job. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'hmp-commands.hx')
1 files changed, 21 insertions, 0 deletions
diff --git a/hmp-commands.hx b/hmp-commands.hx
index fb2f2372c0..f916385c0a 100644
--- a/hmp-commands.hx
+++ b/hmp-commands.hx
@@ -1004,6 +1004,27 @@ Snapshot device, using snapshot file as target if provided
+ .name = "drive_mirror",
+ .args_type = "reuse:-n,full:-f,device:B,target:s,format:s?",
+ .params = "[-n] [-f] device target [format]",
+ .help = "initiates live storage\n\t\t\t"
+ "migration for a device. The device's contents are\n\t\t\t"
+ "copied to the new image file, including data that\n\t\t\t"
+ "is written after the command is started.\n\t\t\t"
+ "The -n flag requests QEMU to reuse the image found\n\t\t\t"
+ "in new-image-file, instead of recreating it from scratch.\n\t\t\t"
+ "The -f flag requests QEMU to copy the whole disk,\n\t\t\t"
+ "so that the result does not need a backing file.\n\t\t\t",
+ .mhandler.cmd = hmp_drive_mirror,
+ },
+@item drive_mirror
+@findex drive_mirror
+Start mirroring a block device's writes to a new destination,
+using the specified target.
+ {
.name = "drive_add",
.args_type = "pci_addr:s,opts:s",
.params = "[[<domain>:]<bus>:]<slot>\n"