Bug 744162

Summary: virt-manager: policykit not asking for password on f15
Product: [Fedora] Fedora Reporter: Sanjay Arora <sanjay.k.arora>
Component: virt-managerAssignee: Cole Robinson <crobinso>
Status: CLOSED WORKSFORME QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 15CC: berrange, crobinso, dougsland, dpierce, hbrock, jforbes, sanjay.k.arora, virt-maint, xen-maint
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-01-27 23:40:51 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Sanjay Arora 2011-10-07 10:30:00 UTC
Description of problem:
Not able to run virt-manager.

Error: Virtual Machine Manager Connection Failure
Unable to open a connection to the libvirt management daemon.

Libvirt URI is: qemu:///system

Verify that:
 - The 'libvirtd' daemon has been started

authentication failed

Details:
Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/connection.py", line 1055, in _try_open
    None], flags)
  File "/usr/lib64/python2.7/site-packages/libvirt.py", line 107, in openAuth
    if ret is None:raise libvirtError('virConnectOpenAuth() failed')
libvirtError: authentication failed

Note-
- libvirtd is ruuning as a daemon.
- If you launch virt-manager from root cli, this problem is not encountered.
- virt-manager does not ask  a user for authentication/higher previledges at the time of running, if launched from gui as a normal user. 
- I tested with selinux=permissive & selinux=disabled and that does not have any effect.

Version-Release number of selected component (if applicable):
0.8.7, Fedora 15 updated till date.

How reproducible:
Just launch Virt Manager from gui as a normal user and the error results.

Steps to Reproduce:
1. Launch the virt-manager from GUI as normal user and the error results.
2. On the other hand launch as root from cli & virt-manager connects to libvirtd & lists the virtual machines in the system.
3.
  
Actual results:
Virt-Manager cannot connect to lib-virtd and gives error. However, if you launch the same software from cli as root, which is an incorrect practice, it launches just fine. This is so even with selinux disabled.

Error: Virtual Machine Manager Connection Failure
Unable to open a connection to the libvirt management daemon.

Libvirt URI is: qemu:///system

Verify that:
 - The 'libvirtd' daemon has been started

authentication failed

Details:
Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/connection.py", line 1055, in _try_open
    None], flags)
  File "/usr/lib64/python2.7/site-packages/libvirt.py", line 107, in openAuth
    if ret is None:raise libvirtError('virConnectOpenAuth() failed')
libvirtError: authentication failed

Expected results:

Virt-Manager to ask for password for root/higher permissions, then connect to libvirtd and list the virtual machines in the system.

Additional info:

Comment 1 Cole Robinson 2012-01-18 16:40:31 UTC
What desktop environment are you using (gnome, kde, other)? Are you doing this over VNC or SSH to the virt host? What's the output of ps axwww | grep -i polkit

Comment 2 Cole Robinson 2012-01-27 23:40:51 UTC
Closing as WORKSFORME. Please reopen if you can still reproduce, and provide the info from Comment #1, as well as the the output of the following command as a regular user from a bash prompt on the affected machine:

pkcheck --action-id org.libvirt.unix.manage --allow-user-interaction --process $BASHPID