summaryrefslogtreecommitdiff
path: root/qemu-monitor.hx
diff options
context:
space:
mode:
authorLuiz Capitulino <lcapitulino@redhat.com>2009-12-04 15:24:09 -0200
committerAnthony Liguori <aliguori@us.ibm.com>2009-12-07 14:04:20 -0600
commit14d505b1f2605498a8a20fcb0b4596395f62e43e (patch)
tree8fa0a51eabc12097bdd551cae3aa9da3f0edde6c /qemu-monitor.hx
parentd647f672186f35e3400824ce19a243f391d3f228 (diff)
downloadqemu-14d505b1f2605498a8a20fcb0b4596395f62e43e.tar.gz
qemu-14d505b1f2605498a8a20fcb0b4596395f62e43e.tar.bz2
qemu-14d505b1f2605498a8a20fcb0b4596395f62e43e.zip
monitor: Introduce 'block_passwd' command
When using encrypted disk images, QEMU will prompt the user for passwords when started. This makes sense for the user protocol, but doesn't for QMP. The solution is to have Monitor command which allows the user or a Client to set passwords in advance, so that we avoid the prompt completely. This is what block_passwd does, for example: (QEMU) block_passwd ide0-hd0 foobar Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'qemu-monitor.hx')
-rw-r--r--qemu-monitor.hx14
1 files changed, 14 insertions, 0 deletions
diff --git a/qemu-monitor.hx b/qemu-monitor.hx
index 62e395bffd..c2670ee1d9 100644
--- a/qemu-monitor.hx
+++ b/qemu-monitor.hx
@@ -1047,6 +1047,20 @@ Close the file descriptor previously assigned to @var{fdname} using the
used by another monitor command.
ETEXI
+ {
+ .name = "block_passwd",
+ .args_type = "device:B,password:s",
+ .params = "block_passwd device password",
+ .help = "set the password of encrypted block devices",
+ .user_print = monitor_user_noop,
+ .mhandler.cmd_new = do_block_set_passwd,
+ },
+
+STEXI
+@item block_passwd @var{device} @var{password}
+Set the encrypted device @var{device} password to @var{password}
+ETEXI
+
STEXI
@end table
ETEXI