Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 594535 - libvirt: defining dir pool with an existing directory sets permissions to 0700
libvirt: defining dir pool with an existing directory sets permissions to 0700
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt (Show other bugs)
6.0
All Linux
low Severity medium
: rc
: ---
Assigned To: Daniel Veillard
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-05-20 19:41 EDT by Mikolaj Kucharski
Modified: 2010-07-02 15:33 EDT (History)
5 users (show)

See Also:
Fixed In Version: libvirt-0.8.1-1.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-07-02 15:33:54 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Mikolaj Kucharski 2010-05-20 19:41:38 EDT
After fresh installation of RHEL6 beta with qemu-kvm, libvirt and python-virtinst first run of virt-install failed:


# virt-install \
>         --connect qemu:///system \
>         --name openbsd-47 \
>         --ram 128 \
>         --disk path=/var/lib/libvirt/images/openbsd-47.dsk,cache=writeback,size=4 \
>         --cdrom /var/lib/libvirt/boot/install47-release.iso \
>         --network bridge=virbr1,model=e1000 \
>         --vnc \
>         --noautoconsole \
>         --hvm \
>         --accelerate \
>         --os-variant openbsd4


Starting install...
Allocating 'openbsd-47.dsk'                              |    0 B     00:00
ERROR    internal error unable to start guest: char device redirected to /dev/pts/2
Warning: vlan 0 with no nics
qemu: could not open disk image /var/lib/libvirt/images/openbsd-47.dsk: Permission denied

Domain installation may not have been
 successful.  If it was, you can restart your domain
 by running 'virsh start openbsd-47'; otherwise, please
 restart your installation.
ERROR    internal error unable to start guest: char device redirected to /dev/pts/2
Warning: vlan 0 with no nics
qemu: could not open disk image /var/lib/libvirt/images/openbsd-47.dsk: Permission denied
Traceback (most recent call last):
  File "/usr/sbin/virt-install", line 943, in <module>
    main()
  File "/usr/sbin/virt-install", line 839, in main
    start_time, guest.start_install)
  File "/usr/sbin/virt-install", line 894, in do_install
    dom = install_func(conscb, progresscb, wait=(not wait))
  File "/usr/lib/python2.6/site-packages/virtinst/Guest.py", line 660, in start_install
    return self._do_install(consolecb, meter, removeOld, wait)
  File "/usr/lib/python2.6/site-packages/virtinst/Guest.py", line 758, in _do_install
    self.domain = self.conn.createLinux(install_xml, 0)
  File "/usr/lib64/python2.6/site-packages/libvirt.py", line 1098, in createLinux
    if ret is None:raise libvirtError('virDomainCreateLinux() failed', conn=self)
libvirtError: internal error unable to start guest: char device redirected to /dev/pts/2
Warning: vlan 0 with no nics
qemu: could not open disk image /var/lib/libvirt/images/openbsd-47.dsk: Permission denied
Comment 1 Mikolaj Kucharski 2010-05-20 19:44:51 EDT
# ls -lhd /var/cache/libvirt/qemu /var/lib/libvirt/images
drwxr-xr-x. 2 qemu qemu 4.0K May 21 00:16 /var/cache/libvirt/qemu
drwx------. 2 root root 4.0K May 21 00:22 /var/lib/libvirt/images

# rpm -qV libvirt python-virtinst
.M.......    /var/cache/libvirt/qemu
.M.......    /var/lib/libvirt/images

# rpm --setperms libvirt python-virtinst
# rpm -qV libvirt python-virtinst

# ls -lhd /var/cache/libvirt/qemu /var/lib/libvirt/images
drwx------. 2 qemu qemu 4.0K May 21 00:16 /var/cache/libvirt/qemu
drwx--x--x. 2 root root 4.0K May 21 00:22 /var/lib/libvirt/images
Comment 3 Mikolaj Kucharski 2010-05-20 19:50:04 EDT
After above `rpm --setperms' everything works fine. Reporting this as I don't
how that happened that permissions changed. I'm not aware that I've change
that.
Comment 4 Mikolaj Kucharski 2010-05-20 19:53:26 EDT
I had exactly the same issue when I installed Fedora 12 with virt-preview for f12 (rawvirt) repository, so Fedora 13 may be affected as well.
Comment 5 Mikolaj Kucharski 2010-05-20 20:02:19 EDT
# rpm -q libvirt python-virtinst redhat-release
libvirt-0.7.6-2.el6.x86_64
python-virtinst-0.500.1-3.el6.noarch
redhat-release-6-6.0.0.24.el6.x86_64
Comment 6 Mikolaj Kucharski 2010-05-25 10:15:01 EDT
Maybe here is the source of the problem?

# virsh pool-dumpxml default | grep -w mode
      <mode>0700</mode>

but that should be 0711

# ls -lhd /var/lib/libvirt/images
drwx--x--x. 2 root root 4.0K May 21 10:45 /var/lib/libvirt/images
Comment 7 Cole Robinson 2010-05-25 10:42:18 EDT
This is fixed by the libvirt package currently queued for RHEL6.
Comment 8 RHEL Product and Program Management 2010-06-07 11:54:08 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.
Comment 11 LiZhang Li 2010-06-28 03:27:55 EDT
Verified using the latest version of using the latest libvirt(libvirt-0.8.1-10.el6.x86_64), qemu(qemu-kvm-0.12.1.2-2.81.el6.x86_64) and python-virtinst(python-virtinst-0.500.3-2.el6.noarch).


The installation works fine.

virt-install \
         --connect qemu:///system \
         --name fedora_12_test \
         --ram 512 \
         --disk path=/var/lib/libvirt/images/fedora_12.img,size=4 \
         --cdrom /var/lib/libvirt/boot/Fedora-13-x86_64-DVD.iso \
         --network bridge=virbr0,model=e1000 \
         --vnc \
         --hvm \
         --accelerate \
         --os-variant fedora12
Comment 12 releng-rhel@redhat.com 2010-07-02 15:33:54 EDT
Red Hat Enterprise Linux Beta 2 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.

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