[libvirt-users] "failed to connect to the hypervisor"

Ken D'Ambrosio
2015-10-19T19:57:39Z

Hi, all.  Ubuntu host, attempting to get virsh working with
VirtualBox... and failing.  Here's what happens:

root@foobox:~# virsh -c vbox:///session list
error: failed to connect to the hypervisor
error: internal error: unable to initialize VirtualBox driver API

------------------------------------------------------

Now, most of the docs I read about "failed to connect to the
hypervisor"
have other errors that happen *before* the "failed to connect" one,
that
are the root cause (e.g., unable to open socket, or bad cert, or
whatever).  But that's not the case, here.  And what puzzles me more is
that -- while I don't know what the output *should* look like -- to my
eye, strace seems to say that we're getting information back:

1940  read(5, "Node 1 MemTotal:       33011680 kB\nNode 1 MemFree:
  32565612 kB\nNode 1 MemUsed:          446068 kB\nNode 1 Active:
    57948 kB\nNode 1 Inactive:          77036 kB\nNode 1 Active(anon):
   27688 kB\nNode 1 Inactive(anon):       84 kB\nNode 1 Active(file):
  30260 kB\nNode 1 Inactive(file):    76952 kB\nNode 1 Unevictable:
    52 kB\nNode 1
[...]

------------------------------------------------------

In my googling, I see mention of per-VM XML files that... do something.
But what they do, and how they're generated, doesn't seem clear.  (E.g.,
XML mentioned here: http://libvirt.org/drvvbox.html -- it just sort of
sits there, with no context.)  Is that something I need?

Thanks for any enlightenment you might be able to offer me,

-Ken