2021-02-08 09:23:45 +00:00
|
|
|
qemu-img \
|
|
|
|
create \
|
|
|
|
-f luks \
|
2020-09-17 11:32:54 +00:00
|
|
|
--object secret,id=LuksDemo.img_encrypt0,file=/path/to/secretFile \
|
2021-03-31 08:46:36 +00:00
|
|
|
-o key-secret=LuksDemo.img_encrypt0 \
|
|
|
|
/var/lib/libvirt/images/LuksDemo.img \
|
2021-02-08 09:23:45 +00:00
|
|
|
5242880K
|
|
|
|
qemu-img \
|
|
|
|
convert \
|
|
|
|
--image-opts \
|
|
|
|
-n \
|
|
|
|
--target-image-opts \
|
2020-09-17 11:32:54 +00:00
|
|
|
--object secret,id=LuksDemo.img_encrypt0,file=/path/to/secretFile \
|
2021-03-31 08:46:36 +00: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
|