Features/Block/Rebase: Difference between revisions
Choonho.son (talk | contribs) No edit summary |
No edit summary |
||
(One intermediate revision by one other user not shown) | |||
Line 81: | Line 81: | ||
== Detailed Smmary == | == Detailed Smmary == | ||
'''Links''' | '''Links''' | ||
* [https://github.com/choonho/qemu-rebase] | * [https://github.com/choonho/qemu-rebase qemu-rebase.git] | ||
== Status == | == Status == | ||
[[Category:Obsolete feature pages]] |
Latest revision as of 14:44, 11 October 2016
Summary
Add dynamic rebase of running disk
Owner
- Name: Choonho Son
- Email: choonho.son@gmail.com
Description
qapi-schema.json
## # @block_rebase # # This command will change backing file of disk. # # Since: 2.x ## { 'command': 'block_rebase', 'data' : { 'device' : 'str', 'file' : 'str' } }
qmp-command.hx
{ .name = "block_rebase", .args_type = "device:s,file:s", .mhandler.cmd_new = qmp_marshal_input_block_rebase, }, SQMP block_rebase ------------ Rebase a block image file in another location while a guest is running. Arguments: - "device": the device's ID, must be unique - "file": new backing file path Example: -> { "execute": "block_rebase", "arguments": { "device": "ide0-hd0", "file": "/storage/new_base.img" }} <- { "return": {} } EQMP
hmp-command.hx
{ .name = "block_rebase", .args_type = "drive:s,file:s", .params = "drive file", .help = "rebase drive's backing file", .mhandler.cmd = hmp_block_rebase, }, STEXI @item block_rebase @findex block_rebase Rebase drive's backing file. ETEXI
Usage example
Original Disk
New rebased Disk
QMP command
{ "execute": "block_rebase", "arguments": { "device": "ide0-hd0", "file": "/storage/new_base.img" } }
HMP command
(qemu) block_rebase ide0-hd0 /storage/new_base.img
Detailed Smmary
Links