[libvirt] [PATCH] Support 'block_passwd' command for QEMU disk encryption
Daniel P. Berrange
berrange at redhat.com
Thu Feb 11 15:09:08 UTC 2010
On Thu, Feb 11, 2010 at 02:31:37PM +0000, Daniel P. Berrange wrote:
> The old text mode monitor prompts for a password when disks are
> encrypted. This interactive approach doesn't work for JSON mode
> monitor. Thus there is a new 'block_passwd' command that can be
> used.
>
> * src/qemu/qemu_driver.c: Split out code for looking up a disk
> secret from findVolumeQcowPassphrase, into a new method
> getVolumeQcowPassphrase. Enhance qemuInitPasswords() to also
> set the disk encryption password via the monitor
> * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h,
> src/qemu/qemu_monitor_json.c, src/qemu/qemu_monitor_json.h,
> src/qemu/qemu_monitor_text.c, src/qemu/qemu_monitor_text.h: Add
> support for the 'block_passwd' monitor command.
> ---
> src/qemu/qemu_driver.c | 117 +++++++++++++++++++++++++++++-------------
> src/qemu/qemu_monitor.c | 15 +++++
> src/qemu/qemu_monitor.h | 4 ++
> src/qemu/qemu_monitor_json.c | 33 ++++++++++++
> src/qemu/qemu_monitor_json.h | 4 ++
> src/qemu/qemu_monitor_text.c | 47 +++++++++++++++++
> src/qemu/qemu_monitor_text.h | 4 ++
> 7 files changed, 188 insertions(+), 36 deletions(-)
FYI, I also added a test case for storage encryption
http://libvirt.org/git/?p=libvirt-tck.git;a=commit;h=362d72acd941481f9d83e8511c2b58da8fb2bd10
Daniel
--
|: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
More information about the libvir-list
mailing list