RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 594535 - libvirt: defining dir pool with an existing directory sets permissions to 0700
Summary: libvirt: defining dir pool with an existing directory sets permissions to 0700
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.0
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Daniel Veillard
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-05-20 23:41 UTC by Mikolaj Kucharski
Modified: 2010-07-02 19:33 UTC (History)
5 users (show)

Fixed In Version: libvirt-0.8.1-1.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-07-02 19:33:54 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Mikolaj Kucharski 2010-05-20 23:41:38 UTC
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 23:44:51 UTC
# 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 23:50:04 UTC
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 23:53:26 UTC
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-21 00:02:19 UTC
# 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 14:15:01 UTC
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 14:42:18 UTC
This is fixed by the libvirt package currently queued for RHEL6.

Comment 8 RHEL Program Management 2010-06-07 15:54:08 UTC
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 07:27:55 UTC
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 19:33:54 UTC
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.