From a4dea8a9f4e0a4a863e5f3b366350fd697552d8a Mon Sep 17 00:00:00 2001 From: Luiz Capitulino Date: Wed, 23 Nov 2011 13:28:21 -0200 Subject: qapi: Convert block_passwd Signed-off-by: Anthony Liguori Signed-off-by: Luiz Capitulino --- qapi-schema.json | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'qapi-schema.json') diff --git a/qapi-schema.json b/qapi-schema.json index 1d6fb4d9f4..569aa74a7c 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -999,3 +999,36 @@ # notification. ## { 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} } + +## +# @block_passwd: +# +# This command sets the password of a block device that has not been open +# with a password and requires one. +# +# The two cases where this can happen are a block device is created through +# QEMU's initial command line or a block device is changed through the legacy +# @change interface. +# +# In the event that the block device is created through the initial command +# line, the VM will start in the stopped state regardless of whether '-S' is +# used. The intention is for a management tool to query the block devices to +# determine which ones are encrypted, set the passwords with this command, and +# then start the guest with the @cont command. +# +# @device: the name of the device to set the password on +# +# @password: the password to use for the device +# +# Returns: nothing on success +# If @device is not a valid block device, DeviceNotFound +# If @device is not encrypted, DeviceNotEncrypted +# If @password is not valid for this device, InvalidPassword +# +# Notes: Not all block formats support encryption and some that do are not +# able to validate that a password is correct. Disk corruption may +# occur if an invalid password is specified. +# +# Since: 0.14.0 +## +{ 'command': 'block_passwd', 'data': {'device': 'str', 'password': 'str'} } -- cgit v1.2.1