'rhn-profile-sync' or 'rhnreg_ks' commands gives error "libvirt.libvirtError: no connection driver available"

Solution Verified - Updated -

Issue

  • Updating a client profile or registering a client gives error "libvir: error : no connection driver available"

  • rhn-profile-sync:

> Updating package profile...  
> Updating hardware profile...  
> Updating virtualization profile...  
> libvir: error : no connection driver available  
> Warning: Could not retrieve virtualization information!  
>         libvirtd service needs to be running.
  • rhnreg_ks:
rhnreg_ks --username <RHN or Satellite username> --password <password> --force 

libvir: error : no connection driver available An error has occurred:

libvirt.libvirtError

See /var/log/up2date for more information:

File "/usr/sbin/rhnreg_ks", line 227, in ?

    cli.run()

  File "/usr/share/rhn/up2date_client/rhncli.py", line 66, in run

    sys.exit(self.main() or 0)

  File "/usr/sbin/rhnreg_ks", line 178, in main

    rhnreg.sendVirtInfo(systemId)

  File "/usr/share/rhn/up2date_client/rhnreg.py", line 674, in sendVirtInfo

    support.refresh()

  File "/usr/share/rhn/virtualization/support.py", line 51, in refresh

    if _is_host_domain():

  File "/usr/share/rhn/virtualization/support.py", line 161, in _is_host_domain

    conn = libvirt.open(None)

  File "/usr/lib/python2.4/site-packages/libvirt.py", line 169, in open

    if ret is None:raise libvirtError('virConnectOpen() failed')

libvirt.libvirtError: no connection driver available

Environment

  • Red Hat Enterprise Linux 5

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content