From: "Daniel P. Berrange" <berrange@redhat.com>
To: 陳培泓 <pahome.chen@mirlab.org>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Can I mount encrypt qcow2?
Date: Thu, 20 Jul 2017 09:59:58 +0100 [thread overview]
Message-ID: <20170720085958.GC21566@redhat.com> (raw)
In-Reply-To: <CAB3eZfsG9YLTfA8ATJujjGE1D3G3iQQ+OXmUvo49J7d-QpDgTg@mail.gmail.com>
On Thu, Jul 20, 2017 at 10:43:53AM +0800, 陳培泓 wrote:
> Can I mount encrypt qcow2 file through qemu-nbd?
What encryption format are you referring to ? The old AES encrypt, or the
new LUKS encrypt ? The latter is the only one people should be using, and
you can expose it with
qemu-nbd --object secret,id=sec0,file=passwd.txt,format=raw \
--image-opts driver=qcow2,file.filename=demo.qcow2,encrypt.format=luks,encrypt.key-secret=sec0
Note that 'passwd.txt' file must *not* contain a newline. eg create it
with 'echo -n 123456 > passwd.txt' - the -n flag to omit the newline
You should only do decrypt in qemu-nbd, if you are trying to interoperate
with non-QEMU tools. If you are exposing the NBD volume to a QEMU system
emulator, you should make the NBD server expose the file as raw, and let
the QEMU client do the decryption instead, so data over the NBD socket
is still secure.
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
next prev parent reply other threads:[~2017-07-20 9:00 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-20 2:43 [Qemu-devel] Can I mount encrypt qcow2? 陳培泓
2017-07-20 8:59 ` Daniel P. Berrange [this message]
2017-07-20 9:07 ` 陳培泓
2017-07-20 9:12 ` Daniel P. Berrange
2017-07-21 1:44 ` 陳培泓
2017-07-21 8:38 ` Daniel P. Berrange
2017-07-21 9:31 ` 陳培泓
2017-07-21 9:34 ` Daniel P. Berrange
2017-07-21 9:41 ` 陳培泓
2017-07-21 12:18 ` Eric Blake
2017-07-21 14:05 ` Eric Blake
2017-07-21 14:06 ` Daniel P. Berrange
2017-07-21 14:18 ` Eric Blake
2017-07-24 1:49 ` 陳培泓
2017-07-24 12:25 ` Eric Blake
2017-07-25 4:26 ` lampahome
2017-07-25 11:26 ` Eric Blake
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170720085958.GC21566@redhat.com \
--to=berrange@redhat.com \
--cc=pahome.chen@mirlab.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.