Bug 726617 - libvirt regression with creating encrypted volume
Summary: libvirt regression with creating encrypted volume
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.1
Hardware: x86_64
OS: Linux
urgent
high
Target Milestone: rc
: ---
Assignee: Daniel Veillard
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 711151
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-07-29 08:19 UTC by RHEL Program Management
Modified: 2022-07-09 05:27 UTC (History)
22 users (show)

Fixed In Version: libvirt-0.8.7-18.el6_1.1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-08-23 14:41:01 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:1197 0 normal SHIPPED_LIVE Moderate: libvirt security and bug fix update 2011-08-23 14:40:22 UTC

Description RHEL Program Management 2011-07-29 08:19:50 UTC
This bug has been copied from bug #711151 and has been proposed
to be backported to 6.1 z-stream (EUS).

Comment 8 Vivian Bian 2011-08-15 07:01:30 UTC
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

Comment 9 errata-xmlrpc 2011-08-23 14:41:01 UTC
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


Note You need to log in before you can comment on or make changes to this bug.