# virt-manager seeks drivers

## idella4

I've been exploring xen and its capabilities on other distros.  I'd like to see xen operate properly with virtual manager,

or virt-manager.  It's freshly emerged, but similar to some other distros, doesn't connect to the xen hypervisor.

I have qemu-kvm emerged also.  I have seen virt-manager effectively connect properly to qemu

and kvm in a regular kernel, but they struggle when booted into xen.

One thing in common is the kernel.  I had to use a gentoo xen kernel to boot into dom0 on them, so it's

the same kernel  in gentoo.

On bringing up virt-manager it yields

```

Unable to open connection to hypervisor URI 'qemu:///system':

unable to connect to '/var/run/libvirt/libvirt-sock': Permission denied

Traceback (most recent call last):

  File "/usr/share/virt-manager/virtManager/connection.py", line 871, in _try_open

    None], flags)

  File "/usr/lib/python2.6/site-packages/libvirt.py", line 111, in openAuth

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

libvirtError: unable to connect to '/var/run/libvirt/libvirt-sock': Permission denied

```

but,  bringing it up via sudo virt-manager yields

```

Unable to open connection to hypervisor URI 'qemu:///system':

no hypervisor driver available for qemu:///system

Traceback (most recent call last):

  File "/usr/share/virt-manager/virtManager/connection.py", line 871, in _try_open

    None], flags)

  File "/usr/lib/python2.6/site-packages/libvirt.py", line 111, in openAuth

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

libvirtError: no hypervisor driver available for qemu:///system

```

or sudo virt-manager -c xen yields 

```

Unable to open connection to hypervisor URI 'xen:///':

no hypervisor driver available for xen:///

Traceback (most recent call last):

  File "/usr/share/virt-manager/virtManager/connection.py", line 871, in _try_open

    None], flags)

  File "/usr/lib/python2.6/site-packages/libvirt.py", line 111, in openAuth

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

libvirtError: no hypervisor driver available for xen:///

```

Similarly, 

```

idella@genny ~/Documents $ sudo virsh

error: no hypervisor driver available

error: failed to connect to the hypervisor

```

It produces the above for qemu booting a regular kernel too.  This makes virt-manager not able to be used to manage vms.

I've tried the google search which produces virtually no matching links.  It seems odd that such a fundamental thing would be missing

I found

 *Quote:*   

> 
> 
>  Connections to Xen driver
> 
> The libvirt Xen driver is a single-instance privileged driver, with a driver name of 'xen'. Some example conection URIs for the libvirt driver are:
> ...

 

Anybody can help rectify this?

----------

## drescherjm

Did you start the daemon?

```
/etc/init.d/libvirtd start
```

----------

## idella4

 *Quote:*   

> 
> 
> Did you start the daemon?
> 
> 

 

```

genny Documents # rc-update show

           alsasound | boot

            bootmisc | boot

             checkfs | boot

           checkroot | boot

               clock | boot

         consolefont | boot

          consolekit |      default

                dbus |      default

                hald |      default

            hostname | boot

             keymaps | boot

            libvirtd |      default

               local |      default nonetwork

          localmount | boot

             modules | boot

              net.lo | boot

            netmount |      default

           rmnologin | boot

             urandom | boot

                 xdm |      default

                xend |      default

```

```

genny Documents # which libvirtd

/usr/sbin/libvirtd

```

so, yes.  I've pursued libvirt quite a bit in debian based distros, and it plays up something awful.  I was hoping gentoo's version would

be in order, but this is even more fundamental and crippling.  Other working versions don't have a driver named xen loaded.

They don't have a driver named xen.

In the others, installing vms with virt-manager is a no go for other reasons, but at least it connects to xen and faulters further on.

With this, locked out totally, unusable.

----------

## Caprisun

 *idella4 wrote:*   

>  *Quote:*   
> 
> Did you start the daemon?
> 
>  
> ...

 

I recently encountered this problem.

After taking a good look at things, I realized virt-manager (libvirt) is NOT part of qemu.

I looked for USE flags, and libvirt makes use of the "qemu" flag.

Enabling this flag fixed the URI Driver issue.

After you recompile libvirt with the flag, the virt-manager may persist with a similar looking error, this time related to authentication. It will want you to check if the libvirtd is running, but it's most likely not the problem.

Editing /etc/libvirt/libvirtd.conf with the appropriate authentication parameters should result in success.

EDIT : I am using qemu-kvm on my system...

----------

