Hide Forgot
This bug has been copied from bug #711151 and has been proposed to be backported to 6.1 z-stream (EUS).
In POST: http://post-office.corp.redhat.com/archives/rhvirt-patches/2011-June/msg00059.html
Tested with libvirt-0.8.7-18.el6_1.1.x86_64 qemu-kvm-0.12.1.2-2.160.el6_1.7.x86_64 kernel-2.6.32-131.12.1.el6.x86_64 1. Define a secret with an XML document. # cat demo-secret.xml <secret ephemeral='no' private='no'> <uuid>0a81f5b2-8403-7b23-c8d6-21ccc2f80d6f</uuid> <usage type='volume'> <volume>/var/lib/libvirt/images/demo.qcow2</volume> </usage> </secret> # virsh secret-define demo-secret.xml Secret 0a81f5b2-8403-7b23-c8d6-21ccc2f80d6f created 2. Set the value of the secret. # MYSECRET=`echo "open seseme" | base64` # virsh secret-set-value 0a81f5b2-8403-7b23-c8d6-21ccc2f80d6f $MYSECRET Secret value set 3. Define and active a pool with the following XML. # cat demo-pool.xml <pool type='dir'> <name>VirtualMachines</name> <source> </source> <target> <path>/var/lib/libvirt/images</path> </target> </pool> # virsh pool-define demo-pool.xml Pool VirtualMachines defined from demo-pool.xml # virsh pool-start VirtualMachines Pool VirtualMachines started 4. To create an encrypted volume within this pool with the follwing XML. # cat demo-disk.xml <volume> <name>demo.qcow2</name> <capacity>5368709120</capacity> <target> <format type='qcow2'/> <encryption format='qcow'> <secret type='passphrase' uuid='0a81f5b2-8403-7b23-c8d6-21ccc2f80d6f'/> </encryption> </target> </volume> 5. # virsh vol-create VirtualMachines demo-disk.xml Vol demo.qcow2 created from demo-disk.xml 6. # virsh vol-list VirtualMachines Name Path ----------------------------------------- demo.qcow2 /var/lib/libvirt/images/demo.qcow2 So set bug status to VERIFIED
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHSA-2011-1197.html