Bug 735745 - RFE: virt-manager pool creation should provide a permission setting option
Summary: RFE: virt-manager pool creation should provide a permission setting option
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: virt-manager
Version: 6.2
Hardware: x86_64
OS: Linux
medium
high
Target Milestone: rc
: ---
Assignee: Cole Robinson
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-09-05 09:28 UTC by min zhan
Modified: 2011-11-14 03:23 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-11-11 22:35:27 UTC


Attachments (Terms of Use)

Description min zhan 2011-09-05 09:28:41 UTC
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.

Comment 1 Cole Robinson 2011-09-22 15:51:42 UTC
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.

Comment 4 Dave Allan 2011-11-11 22:35:27 UTC
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.


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