]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Explicitly error on uri=qemu://system
authorCole Robinson <crobinso@redhat.com>
Sat, 16 Apr 2016 12:59:08 +0000 (08:59 -0400)
committerCole Robinson <crobinso@redhat.com>
Wed, 20 Apr 2016 13:31:25 +0000 (09:31 -0400)
commit19e49128a6caf49dfed861850104c3e2ce3f81d5
tree0edc72e379c4854b4903a6942ee84c92840dad1a
parent8cb524642782e1cad23bd60f75b610a149217f1b
Explicitly error on uri=qemu://system

It's a fairly common error that a user tries to connect to a URI
like qemu://system or qemu://session (missing a slash). This errors
like:

$ virsh --connect qemu://session
error: failed to connect to the hypervisor
error: Unable to resolve address 'session' service '16514': No address associated with hostname

If you already know that the standard qemu URI has 3 slashes, that
error will make it obvious enough. But new user's may not get it.
There's even a RHEL support page explicitly mentioning it!:

https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Virtualization_Deployment_and_Administration_Guide/sect-Troubleshooting-Common_libvirt_errors_and_troubleshooting.html

Catch this error early in libvirt.c virConnectOpen for qemu (and vbox
which has similar rules

https://bugzilla.redhat.com/show_bug.cgi?id=1038304
(cherry picked from commit 0d1579572a864c33621da4d01408f8bcb6de5d4a)
src/libvirt.c