I thought 2.9.0 is the latest and check to the wrong commit. Now it supports encryption.
My cmd is: > 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 But it shows error message: > No encryption in image header, but options specified format 'luks' Something wrong? My procedure is below: 1. create a clean demo.qcow2 image(no compression, no encryption) 2. use the cmd above to encrypt the demo.qcow2 image 2017-07-24 20:25 GMT+08:00 Eric Blake <ebl...@redhat.com>: > On 07/23/2017 08:49 PM, 陳培泓 wrote: > > I check to the newest version of qemu. > > You're still top-posting, which makes it really hard to answer your > questions. > > > > > and do the cmds to install followed by the documents in github: > > > >> mkdir build > >> cd build > >> ../configure > >> make > > > > > > and it show nothing errors > > It's the version when I enter qemu-img --help: > > > > and I execute encrypt format(luks) to the qcow2 file: > > > > > > Attaching inline images is a horrible waste of bandwidth, compared to > copying-and-pasting the terminal text directly. Furthermore, your email > is illegible in a plain-text client (like what I prefer to use), and > requires that I switch to html view to even understand what you are asking. > > > always shows the error, how to solve it? > > Transcribing one of your images: > > > pahome@pahome-QW09:~/git/qemu/build$ ./qemu-img --help > > qemu-img version 2.9.0 (v2.9.0-dirty) > > You aren't building the latest version of qemu.git. If you were, you'd > be getting something like this: > > $ ./qemu-img --help | head -n1 > qemu-img version 2.9.50 (v2.9.0-2519-gb52f59694d) > > Before you can complain that something recently added isn't working, you > first have to make sure you are building the right version. > > -- > Eric Blake, Principal Software Engineer > Red Hat, Inc. +1-919-301-3266 > Virtualization: qemu.org | libvirt.org > >