Bug 1038304 - virsh -c qemu://session (missing slash) gives obscure error: Cannot read CA certificate '/etc/pki/CA/cacert.pem'
Summary: virsh -c qemu://session (missing slash) gives obscure error: Cannot read CA c...
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-04 21:08 UTC by Ray Strode [halfline]
Modified: 2016-04-19 21:53 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-04-19 21:53:26 UTC
Embargoed:


Attachments (Terms of Use)

Description Ray Strode [halfline] 2013-12-04 21:08:53 UTC
<mclasen> so, why does virt-manager refuse to connect to a session instance
<mclasen> with the words 'Cannot read CA certificate '/etc/pki/CA/cacert.pem' ?
<halfline> mclasen_: http://wiki.libvirt.org/page/TLSCreateCACert mentions mv cacert.pem /etc/pki/CA
<halfline> mclasen_: could it be you did qemu://localhost/session instead of qemu:///session ?
<mclasen_> I am clicking on a 'session (QEMU)
<mclasen_> ' in the virt-manager ui
<mclasen_> which claims to be qemu:///session
<halfline> okay crobinso might have a clue
<crobinso> mclasen_: where's the rest of the conversation?
<halfline> crobinso: we figured it out
<halfline> wrong number of slashes
<halfline> crobinso: if you do virt-manager -c qemu://session instead of virt-manager -c qemu:///session it gives a really confusing error message about TLS ca certificates
<crobinso> halfline: ah yeah, that's some libvirt weirdness that hits people on occasion. it should be fixable if someone wanted to file a bug

Comment 1 Cole Robinson 2013-12-04 21:19:23 UTC
To clarify a bit:

# virsh --connect qemu://session
error: failed to connect to the hypervisor
error: Cannot read CA certificate '/etc/pki/CA/cacert.pem': No such file or directory

There have been quite a few people over the years that have made a similar mistake and been completely confused by the error message, it would be nice to help them out: "are you missing a slash?" or something similar.

Comment 2 Cole Robinson 2016-04-18 23:04:59 UTC
I sent a patch upstream:

http://www.redhat.com/archives/libvir-list/2016-April/msg01169.html

Comment 3 Cole Robinson 2016-04-19 21:53:26 UTC
Upstream now:

commit 0d1579572a864c33621da4d01408f8bcb6de5d4a
Author: Cole Robinson <crobinso>
Date:   Sat Apr 16 08:59:08 2016 -0400

    Explicitly error on uri=qemu://system


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