Bug 860633 - 'virsh list' does not print error when not run as root
'virsh list' does not print error when not run as root
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: libvirt (Show other bugs)
18
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Libvirt Maintainers
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-26 07:18 EDT by Stef Walter
Modified: 2012-09-26 09:28 EDT (History)
11 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-09-26 07:29:50 EDT
Type: Bug
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 Stef Walter 2012-09-26 07:18:38 EDT
Description of problem:

When run as a non-root user 'virsh list' does not print any virtual machines. It also does not report an error:

[stef@stef-rawhide ~]$ virsh list
 Id    Name                           State
----------------------------------------------------

Version-Release number of selected component (if applicable):

[root@stef-rawhide data]# rpm -qf /usr/bin/virsh 
libvirt-client-0.10.2-3.fc18.x86_64
Comment 1 Eric Blake 2012-09-26 07:29:50 EDT
Not a bug.  By default, non-root users connect to 'qemu:///session' rather than 'qemu:///system', and as that is a different URI tied to a different instance of libvirtd, the output is expected to be different.  To get the system listing as non-root, you must set your desired URI, such as by 'virsh -c qemu:///system list'.
Comment 2 Dave Allan 2012-09-26 09:28:17 EDT
(In reply to comment #1)
> Not a bug.  By default, non-root users connect to 'qemu:///session' rather
> than 'qemu:///system', and as that is a different URI tied to a different
> instance of libvirtd, the output is expected to be different.  To get the

To put it another way, you can define and start VMs with the session URI and then you will see them when you connect to session and list VMs, but the set of VMs on the session URI will always be different from the system URI.  See http://libvirt.org/drvqemu.html for more information.

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