2021-02-08 10:23:45 +01:00
|
|
|
qemu-img \
|
|
|
|
create \
|
|
|
|
-f luks \
|
2018-08-21 09:53:12 -04:00
|
|
|
--object secret,id=OtherDemo.img_encrypt0,file=/path/to/secretFile \
|
2021-03-31 10:46:36 +02:00
|
|
|
-o key-secret=OtherDemo.img_encrypt0 \
|
|
|
|
/var/lib/libvirt/images/OtherDemo.img \
|
2021-02-08 10:23:45 +01:00
|
|
|
5242880K
|
|
|
|
qemu-img \
|
|
|
|
convert \
|
|
|
|
--image-opts \
|
|
|
|
-n \
|
|
|
|
--target-image-opts \
|
2021-03-31 10:46:36 +02:00
|
|
|
--object secret,id=OtherDemo.img_encrypt0,file=/path/to/secretFile \
|
|
|
|
driver=qcow2,file.filename=/var/lib/libvirt/images/sparse-qcow2.img \
|
|
|
|
driver=luks,file.filename=/var/lib/libvirt/images/OtherDemo.img,key-secret=OtherDemo.img_encrypt0
|