On 31/03/2023 15:22, lejeczek wrote:
Hi guys

I'm trying to connect to an encrypted image but my fiddling - as I never known this one - fails.
Very bare cmd fails:

-> $ qemu-nbd --connect=/dev/nbd0 /00-VMs/enc.ommie.qcow2
qemu-nbd: Failed to blk_new_open '/00-VMs/enc.ommie.qcow2': Parameter 'encrypt.key-secret' is required for cipher

so I tried:
-> $ qemu-nbd --connect=/dev/nbd0 /00-VMs/enc.ommie.qcow2 --object encrypt.key-secret=bl........................................
qemu-nbd: Parameter 'qom-type' is missing
and so on I continued to no avail and soon gave up, in hope that some wizard has already a working cmd.

many thanks, L.

If anybody else might need this/similar then something like this should work: -> $ qemu-nbd --connect=/dev/nbd0 --object secret,id=my-sec0,file=/etc/libvirt/secrets/my-secret.base64,format=base64 --image-opts driver=qcow2,file.filename=/00-VMs/enc.mastercommie.qcow2,encrypt.format=luks,encrypt.key-secret=my-sec0

Reply via email to