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