Red Hat Bugzilla – Bug 627693
virsh doesn't give correct error when run as non-root
Last modified: 2014-03-16 23:24:50 EDT
Description of problem:
[notting@nostromo: ~]$ virsh edit splat-f13
error: failed to get domain 'splat-f13'
error: Domain not found: no domain with matching name 'splat-f13'
[notting@nostromo: ~]$ su
[root@nostromo notting]# virsh edit splat-f13
Ideally, I'd get an error message from the unprivleged execution that more accurately describes what happened.
Version-Release number of selected component (if applicable):
The error message *does* accurate describe what happened, thus...
* No URI was provided to virsh, so it picked the first one it finds.
- When running unprivileged it picks 'qemu:///session' which is a private per-user instance of libvirtd.
- When running privileged, it picks 'qemu:///system' which is a single system wide instance of libvirtd.
(It might not even pick QEMU at all if QEMU is not installed, trying lxc or xen or something else)
* The session & system instances of libvirt are completely separate, having no knowledge of each other's guests. Thus the message "no domain with matching name 'splat-f13'" is correct.