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 615854 - virt-manager fails in weird way if home dir permissions are 0711
virt-manager fails in weird way if home dir permissions are 0711
Status: CLOSED WORKSFORME
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: virt-manager (Show other bugs)
6.0
All Linux
low Severity medium
: rc
: ---
Assigned To: Cole Robinson
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-07-19 02:00 EDT by Ray Strode [halfline]
Modified: 2010-07-20 16:54 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-07-20 16:54:19 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 Ray Strode [halfline] 2010-07-19 02:00:59 EDT
I tried to use virt-manager recently and it failed with this error:
[Mon, 19 Jul 2010 01:45:52 virt-manager 19010] DEBUG (error:86) Uncaught Error: Unable to complete install: 'internal error Process exited while reading console log output: char device redirected to /dev/pts/34
qemu: could not load kernel '/home/rstrode/.virtinst/boot/virtinst-vmlinuz.i3tEeu': Permission denied
' : Unable to complete install '<class 'libvirt.libvirtError'> internal error Process exited while reading console log output: char device redirected to /dev/pts/34
qemu: could not load kernel '/home/rstrode/.virtinst/boot/virtinst-vmlinuz.i3tEeu': Permission denied

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/create.py", line 1561, in do_install
    dom = guest.start_install(False, meter = meter)
  File "/usr/lib/python2.6/site-packages/virtinst/Guest.py", line 974, in start_install
    return self._do_install(consolecb, meter, removeOld, wait)
  File "/usr/lib/python2.6/site-packages/virtinst/Guest.py", line 1039, in _do_install
    "install")
  File "/usr/lib/python2.6/site-packages/virtinst/Guest.py", line 1010, in _create_guest
    dom = self.conn.createLinux(start_xml, 0)
  File "/usr/lib64/python2.6/site-packages/libvirt.py", line 1270, in createLinux
    if ret is None:raise libvirtError('virDomainCreateLinux() failed', conn=self)
libvirtError: internal error Process exited while reading console log output: char device redirected to /dev/pts/34
qemu: could not load kernel '/home/rstrode/.virtinst/boot/virtinst-vmlinuz.i3tEeu': Permission denied'

After a bit of debugging it looks like what's going on is the vmlinuz file and initrd are getting chown'd to the "qemu" user and libvirt tries to run qemu as that qemu user which all fails because the qemu user isn't allowed to peer into my home dir (which had a mode of 0711).

chmod 755 /home/rstrode

worked around the issue.  

Proposing as a blocker because it means virt-manager fails in a very common configuration, but feel free to de-escalate if appropriate.
Comment 1 Cole Robinson 2010-07-20 16:32:54 EDT
Works for me here. If your homedir had 711 permissions, the qemu user should have been able to access the qemu owned file.

Are you using NFS homedir? Any chance this is selinux related?

If you change your permissions to 700 and the install, virt-manager should prompt to 'fix' perms using ACLs. Does that work?
Comment 2 Ray Strode [halfline] 2010-07-20 16:54:19 EDT
(In reply to comment #1)
> Works for me here. If your homedir had 711 permissions, the qemu user should
> have been able to access the qemu owned file.
Right.  I assumed it was doing some sort of opendir() call or something.

> Are you using NFS homedir? Any chance this is selinux related?
Not NFS. Also, I've been running with enforcing=0 lately.

> If you change your permissions to 700 and the install, virt-manager should
> prompt to 'fix' perms using ACLs. Does that work?    
So, just now I did this:

chmod 711 /home/rstrode 

and tried to recreate the problem…and I can't.  It's working fine now.  There must be some piece of the puzzle I'm missing, because it was reliably failing before (like a dozen times in a row or so).  Anyway, if I'm the only one who's seeing this issue and I can't even reproduce it anymore, I don't think there's much point keeping the bug open.  My machine isn't exactly what you might call "pristine" anyway, so it could just be random cruft at fault here.

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