Hide Forgot
Description of problem: Now in virt-manager, create a dir pool, default permission is 700. This sometimes will make guest start failed with 'Permission denied' when guest use a manually copied another health guest image to this dir pool. Version-Release number of selected component (if applicable): # uname -r 2.6.32-191.el6.x86_64 qemu-kvm-0.12.1.2-2.184.el6.x86_64 libvirt-0.9.4-6.el6.x86_64 virt-manager-0.9.0-6.el6.x86_64 python-virtinst-0.600.0-3.el6.noarch How reproducible: Always Steps to Reproduce: 1. Use virt-manager to create a dir pool called test. The Target path is /var/lib/libvirt/images/test. # virsh pool-list --all Name State Autostart ----------------------------------------- default active yes test active yes # ll -lhs /var/lib/libvirt/images/ total 9.0G 2.2G -rw-------. 1 root root 8.0G Sep 4 03:33 cdrom.img 4.0K drwx------. 2 root root 4.0K Sep 4 04:16 test ... # virsh pool-dumpxml test <pool type='dir'> <name>test</name> <uuid>9338372a-befe-772e-8796-393739b98de1</uuid> <capacity>30959509504</capacity> <allocation>23477485568</allocation> <available>7482023936</available> <source> </source> <target> <path>/var/lib/libvirt/images/test</path> <permissions> <mode>0700</mode> <owner>-1</owner> <group>-1</group> </permissions> </target> </pool> 2. # cp /var/lib/libvirt/images/cdrom.img /var/lib/libvirt/images/test/ # ll -lhs /var/lib/libvirt/images/test/cdrom.img 2.2G -rw-------. 1 root root 8.0G Aug 30 06:52 /var/lib/libvirt/images/test/cdrom.img # virsh dumpxml guest ... <devices> <emulator>/usr/libexec/qemu-kvm</emulator> <disk type='file' device='disk'> <driver name='qemu' type='raw' cache='none'/> <source file='/var/lib/libvirt/images/test/cdrom.img'/> <target dev='vda' bus='virtio'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> </disk> ... # virsh start guest error: Failed to start domain rhel6test error: internal error Process exited while reading console log output: char device redirected to /dev/pts/12 qemu-kvm: -drive file=/var/lib/libvirt/images/test/cdrom.img,if=none,id=drive-virtio-disk0,format=raw,cache=none: could not open disk image /var/lib/libvirt/images/test/cdrom.img: Permission denied Actual results: As above Expected results: virt-manager should support permission setting for creating a pool. Additional info: If the dir pool permission is 755, guest can be started successfully with same above case.
I think this RFE can safely be deferred to 6.3. However it might be a good idea to file a bug with libvirt to have it change it's default storage pool perms to be 711 so a default pool can be used for qemu guests.
If you're using pools, and you manually copy a volume into it, you're expected to set the permissions properly. IMO this is not a bug.