mirror_qemu/qapi
Daniel P. Berrange d85f4222b4 qcow: convert QCow to use QCryptoBlock for encryption
This converts the qcow driver to make use of the QCryptoBlock
APIs for encrypting image content. This is only wired up to
permit use of the legacy QCow encryption format. Users who wish
to have the strong LUKS format should switch to qcow2 instead.

With this change it is now required to use the QCryptoSecret
object for providing passwords, instead of the current block
password APIs / interactive prompting.

  $QEMU \
    -object secret,id=sec0,file=/home/berrange/encrypted.pw \
    -drive file=/home/berrange/encrypted.qcow,encrypt.format=aes,\
           encrypt.key-secret=sec0

Though note that running QEMU system emulators with the AES
encryption is no longer supported, so while the above syntax
is valid, QEMU will refuse to actually run the VM in this
particular example.

Likewise when creating images with the legacy AES-CBC format

  qemu-img create -f qcow \
    --object secret,id=sec0,file=/home/berrange/encrypted.pw \
    -o encrypt.format=aes,encrypt.key-secret=sec0 \
    /home/berrange/encrypted.qcow 64M

Reviewed-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Alberto Garcia <berto@igalia.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Message-id: 20170623162419.26068-10-berrange@redhat.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
2017-07-11 17:44:56 +02:00
..
Makefile.objs qapi: rename *qmp-*-visitor* to *qobject-*-visitor* 2016-10-25 16:25:48 +02:00
block-core.json qcow: convert QCow to use QCryptoBlock for encryption 2017-07-11 17:44:56 +02:00
block.json qapi: Fix some QMP documentation regressions 2017-06-04 18:42:55 +03:00
common.json qmp-commands: move 'query-commands' doc to schema 2017-01-16 09:19:47 +01:00
crypto.json qapi: The #optional tag is redundant, drop 2017-03-16 07:13:02 +01:00
event.json shutdown: Expose bool cause in SHUTDOWN and RESET events 2017-05-23 13:28:17 +02:00
introspect.json qapi: The #optional tag is redundant, drop 2017-03-16 07:13:02 +01:00
opts-visitor.c qapi: Fix QemuOpts visitor regression on unvisited input 2017-03-22 19:24:34 +01:00
qapi-clone-visitor.c qapi: Remove visit_start_alternate() parameter promote_int 2017-06-20 14:31:31 +02:00
qapi-dealloc-visitor.c qapi: Remove visit_start_alternate() parameter promote_int 2017-06-20 14:31:31 +02:00
qapi-util.c qapi: New parse_qapi_name() 2017-03-07 16:07:47 +01:00
qapi-visit-core.c qapi: Remove visit_start_alternate() parameter promote_int 2017-06-20 14:31:31 +02:00
qmp-dispatch.c qmp: Improve QMP dispatch error messages 2017-05-09 09:14:40 +02:00
qmp-event.c qobject: Use simpler QDict/QList scalar insertion macros 2017-05-09 09:13:51 +02:00
qmp-registry.c qapi: Support multiple command registries per program 2017-03-05 09:12:25 +01:00
qobject-input-visitor.c qapi: update the qobject visitor to use QNUM_U64 2017-06-20 14:31:31 +02:00
qobject-output-visitor.c qapi: update the qobject visitor to use QNUM_U64 2017-06-20 14:31:31 +02:00
rocker.json qapi: The #optional tag is redundant, drop 2017-03-16 07:13:02 +01:00
string-input-visitor.c qapi: add explicit null to string input and output visitors 2017-06-30 14:03:31 +10:00
string-output-visitor.c qapi: add explicit null to string input and output visitors 2017-06-30 14:03:31 +10:00
trace-events qapi: Remove visit_start_alternate() parameter promote_int 2017-06-20 14:31:31 +02:00
trace.json qapi: The #optional tag is redundant, drop 2017-03-16 07:13:02 +01:00