Description of problem: Hello, when I try to dump the network configuration as a non-admin user, 'virsh' gives me an error message as follows: $ virsh net-dumpxml default error: failed to get network 'default' error: Network not found: no network with matching name 'default' The default network very well exists. But the error message hardly tells me what's wrong - that I don't have the right permissions. Can something be done about this, please? Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
(In reply to Amit Saha from comment #0) > Description of problem: > > Hello, when I try to dump the network configuration as a non-admin user, > 'virsh' gives me an error message as follows: > > $ virsh net-dumpxml default > error: failed to get network 'default' > error: Network not found: no network with matching name 'default' > > > The default network very well exists. But the error message hardly tells me > what's wrong - that I don't have the right permissions. That isn't correct. What's wrong is that you are running virsh as a non-root user, and are therefore being connected to an unprivileged instance of libvirtd that allows non-root users to startup guests without having any extra privileges (the facilities available to the guests is limited in some ways, of course). The libvirtd run as root is often called the "system" libvirtd, and has the url (on the local machine) "qemu:///system". The unprivileged libvirtd is called the "session" libvirtd, and has the url "qemu:///session". Just as the session/unprivileged libvirtd has its own list of guests that are in a separate namespace from those defined in the system libvirtd, the session libvirtd can also have its own set of networks, in a separate namespace from those defined in the system libvirtd. So, the error message is correct - the session libvirtd that you have connected to doesn't have any network named "default". It's not really reasonable to expect the session libvirtd to know that you thought you were connecting to the system libvirtd. If you want to run virsh from a non-privileged user and connect to the system libvirtd, try this: virsh -c qemu:///system net-dumpxml default
(In reply to Laine Stump from comment #1) > (In reply to Amit Saha from comment #0) > > Description of problem: > > > > Hello, when I try to dump the network configuration as a non-admin user, > > 'virsh' gives me an error message as follows: > > > > $ virsh net-dumpxml default > > error: failed to get network 'default' > > error: Network not found: no network with matching name 'default' > > > > > > The default network very well exists. But the error message hardly tells me > > what's wrong - that I don't have the right permissions. > > That isn't correct. What's wrong is that you are running virsh as a non-root > user, and are therefore being connected to an unprivileged instance of > libvirtd that allows non-root users to startup guests without having any > extra privileges (the facilities available to the guests is limited in some > ways, of course). > > The libvirtd run as root is often called the "system" libvirtd, and has the > url (on the local machine) "qemu:///system". The unprivileged libvirtd is > called the "session" libvirtd, and has the url "qemu:///session". > > Just as the session/unprivileged libvirtd has its own list of guests that > are in a separate namespace from those defined in the system libvirtd, the > session libvirtd can also have its own set of networks, in a separate > namespace from those defined in the system libvirtd. So, the error message > is correct - the session libvirtd that you have connected to doesn't have > any network named "default". It's not really reasonable to expect the > session libvirtd to know that you thought you were connecting to the system > libvirtd. > > If you want to run virsh from a non-privileged user and connect to the > system libvirtd, try this: > > virsh -c qemu:///system net-dumpxml default Oh i see, Thanks for the detailed explanation. Sorry for reporting without investigating more. (What you explained is also here: http://libvirt.org/drvqemu.html#securitydriver).