qemu-img: add support for --object command line arg

Allow creation of user creatable object types with qemu-img
via a new --object command line arg. This will be used to supply
passwords and/or encryption keys to the various block driver
backends via the recently added 'secret' object type.

 # printf letmein > mypasswd.txt
 # qemu-img info --object secret,id=sec0,file=mypasswd.txt \
      ...other info args...

Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
Daniel P. Berrange 2016-02-17 10:10:17 +00:00 committed by Kevin Wolf
parent 9ba371b634
commit 3babeb153c
3 changed files with 282 additions and 30 deletions

View file

@ -24,6 +24,14 @@ Command parameters:
@table @var
@item filename
is a disk image filename
@item --object @var{objectdef}
is a QEMU user creatable object definition. See the @code{qemu(1)} manual
page for a description of the object properties. The most common object
type is a @code{secret}, which is used to supply passwords and/or encryption
keys.
@item fmt
is the disk image format. It is guessed automatically in most cases. See below
for a description of the supported disk formats.