[CentOS-virt] unable to get domain status from libvirt & KVM

Akemi Yagi amyagi at gmail.com
Thu Mar 11 16:24:07 UTC 2010

Hi Tom,

As someone who suggested to you that you should try this mailing list,
I would like to quote some of the discussions that have taken place in
the main mailing list (
http://lists.centos.org/pipermail/centos/2010-March/091654.html ).

> $ export LIBVIRT_DEBUG=2
> $ virsh list
> 14:21:06.532: error : No vport operation path found for host0
> 14:21:06.550: error : No vport operation path found for host4
> 14:21:06.555: error : No vport operation path found for host3
> 14:21:06.598: error : No vport operation path found for host1
> 14:21:06.599: error : No vport operation path found for host2
> 14:21:06.615: info : No security driver available
>   Id Name                 State
> ----------------------------------

This is empty because, as a non-root user, you are looking at
qemu:///session instead of  qemu:///system. To be able to access the
latter, you would need to do some tweaking.

I wrote:
Look into /etc/libvirt/libvirtd.conf and check out the section "UNIX
socket access controls" and make appropriate adjustment.  [ I created
group 'libvirt' , added myself to the group, and uncommented the line
"unix_sock_group = "libvirt"".]  Then adjust also the permission bits
of the directories and files in /var/run/libvirt to allow access to
the group libvirt.

With some luck, you should be able to run the virsh command (for example):

virsh -c qemu:///system list --all

Then you wrote:
I read about that on libvirt.org but chose not to make any changes
since the Xen server already works with the same config I have on the
KVM server.  I understood libvirt to be a layer that lets one compatible
tool work with many different hypervisors, so I didn't think I'd need to
change my libvirt config to work with KVM if it already works with Xen.
  That might be a bad assumption, though, and I'm not wedded to it.  :)

This is understandable. However, xen and kvm are different in certain
places. For instance, /var/run/libvirt/qemu is unique to kvm, so
making changes to this should not affect your xen configuration. <-
someone please confirm this.

I wrote:
Also, if you create a guest with the -c qemu:///session option, that
would allow non-root user to connect to it.

My understanding is that with the -c qemu:///session option, the guest
will be set up in that user's directory. Therefore, no root privilege
is required.

Comments/help from people who are familiar with kvm welcome. :)


More information about the CentOS-virt mailing list