2021-02-08 09:23:45 +00:00
|
|
|
qemu-img \
|
|
|
|
create \
|
|
|
|
-f luks \
|
2018-08-21 13:53:12 +00:00
|
|
|
--object secret,id=OtherDemo.img_encrypt0,file=/path/to/secretFile \
|
2021-02-08 09:23:45 +00:00
|
|
|
-o key-secret=OtherDemo.img_encrypt0 /var/lib/libvirt/images/OtherDemo.img \
|
|
|
|
5242880K
|
|
|
|
qemu-img \
|
|
|
|
convert \
|
|
|
|
--image-opts \
|
|
|
|
-n \
|
|
|
|
--target-image-opts \
|
|
|
|
--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,\
|
2018-08-21 13:53:12 +00:00
|
|
|
key-secret=OtherDemo.img_encrypt0
|