Description of problem: "virsh start demo" will be hang with an encrypted qcow2 img Version-Release number of selected component (if applicable): libvirt-0.8.2-7.el5 kvm-qemu-img-83-205.el5 kvm-83-205.el5 kernel-2.6.18-227.el5 How reproducible: 5/5 Steps to Reproduce: 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> # virsh vol-create VirtualMachines demo-disk.xml Vol demo.qcow2 created from demo-disk.xml 5. With the following XML config which associates the qcow decryption ‘passphrase’ with the secret we defined to define a new RHEL5.5 guest, and then start it. # wget http://download.englab.nay.redhat.com/pub/rhel/rel-eng/RHEL5.5-Server-20100322.0/tree-x86_64/images/pxeboot/initrd.img # wget http://download.englab.nay.redhat.com/pub/rhel/rel-eng/RHEL5.5-Server-20100322.0/tree-x86_64/images/pxeboot/vmlinuz # cp initrd.img vmlinuz /var/lib/libvirt/boot/ # cat demo-guest.xml <domain type='kvm'> <name>demo</name> <memory>524288</memory> <vcpu>1</vcpu> <os> <type arch='x86_64' machine='pc'>hvm</type> <kernel>/var/lib/libvirt/boot/vmlinuz</kernel> <initrd>/var/lib/libvirt/boot/initrd.img</initrd> <boot dev='hd'/> </os> <devices> <emulator>/usr/libexec/qemu-kvm</emulator> <disk type='file' device='disk'> <driver name='qemu' type='qcow2'/> <source file='/var/lib/libvirt/images/demo.qcow2'/> <target dev='hda' bus='ide'/> <encryption format='qcow'> <secret type='passphrase' uuid='0a81f5b2-8403-7b23-c8d6-21ccc2f80d6f'/> </encryption> </disk> <interface type='network'> <mac address='52:54:00:53:a6:f0'/> <source network='default'/> </interface> <serial type='pty'> <target port='0'/> </serial> <console type='pty'> <target port='0'/> </console> <input type='tablet' bus='usb'/> <input type='mouse' bus='ps2'/> <graphics type='vnc' port='-1' autoport='yes'/> </devices> </domain> # virsh define demo-guest.xml Domain demo defined from demo-guest.xml # virsh start demo Actual results: "virsh start demo" will be hang and guest can not be start successfully. Expected results: Command will be done succeddfully and guest will be start successfully.
*** This bug has been marked as a duplicate of bug 644706 ***