<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Oct 29, 2020 at 4:25 PM Daniel P. Berrange <<a href="mailto:dan@berrange.com">dan@berrange.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Thu, Oct 29, 2020 at 04:13:45PM +0100, Natxo Asenjo wrote:<br>> if I run virsh list --all I get an empty listing.<br>
> <br>
> So using cockpit I can manage the system vms, but I cannot use virsh.<br>
> <br>
> This is in a rhel 7.8 system. The host is joined to an Idm realm, and this<br>
> realm has a trust to an AD forest. The users are AD users mapped to an<br>
> external Idm group.<br>
> <br>
> Any ideas as to what we do wrong?<br>
<br>
There are two distinct instances of libvirt - system mode and session<br>
mode. I suspect cockpit is using a different instance than your<br>
virsh command<br>
<br>
<a href="https://libvirt.org/drvqemu.html#securitydriver" rel="noreferrer" target="_blank">https://libvirt.org/drvqemu.html#securitydriver</a><br>
<br>
virsh defaults to "session" mode if running non-root, "system" mode<br>
if running as root. You can use "-c URI" to override the default if<br>
running non-root.</blockquote><div><br></div><div>ah, yes. I try this:</div><div><br></div><div>$ virsh -c qemu:///system</div><div><br></div><div>But it then I get a prompt:</div><div><br></div><div>==== AUTHENTICATING FOR org.libvirt.unix.manage =============</div><div>System policy prevents management of local virtualized systems</div><div>Authenticating as:  sudo_user_not_disclosed</div><div>Password:</div><div>Password:</div><div>polikit-agent-helper-1: pam_authenticate failed: Authentication failure</div><div><br></div><div>Our allowed groups in the /etc/dbus-1/system.d/org.libvirt.conf are no sudo users (this can change, but not as of now). It is a bit strange that the get the password prompt for a local sudo user we have in place for as systems have no working sssd connection to the idm realm (break glass user)</div><div><br></div><div>My user can use the system bus in cockpit without a password.</div><div><br></div><div>The dbus policy looks like this:</div><div><br></div><div><policy group="groupname"></div><div>    < allow send_destination="org.libvirt"/></div><div></policy></div><div><div><policy group="other_groupname"></div><div>    < allow send_destination="org.libvirt"/></div><div></policy></div></div></div></div>