I have installed virtualbox 3.1.6 r.59338 e libvirt 0.7.0, but i have the same error...

libvir: VBOX error : internal error unable to initialize VirtualBox driver API
Traceback (most recent call last):
  File "prova.py", line 5, in <module>
    conn = libvirt.open("vbox:///session")
  File "/usr/lib/python2.6/dist-packages/libvirt.py", line 163, in open
    if ret is None:raise libvirtError('virConnectOpen() failed')
libvirt.libvirtError: internal error unable to initialize VirtualBox driver API



Da: Matthias Bolte <matthias.bolte@googlemail.com>
A: angelo alfano <angeloalfa76@yahoo.it>
Cc: libvirt mail-list <libvirt-users@redhat.com>; Pritesh Kothari <pritesh.kothari@sun.com>
Inviato: Mer 31 marzo 2010, 18:43:52
Oggetto: Re: [libvirt-users] connect libvirt and virtualbox

2010/3/31 angelo alfano <angeloalfa76@yahoo.it>:
>
>>2010/3/31 angelo alfano <angeloalfa76@yahoo.it>:
>>> conn = libvirt.open("vbox:///session")
>>>
>>> return this error:
>>>
>>> libvir: VBOX error : internal error unable to initialize VirtualBox
>>> driver
>>> API
>>> Traceback (most recent call last):
>>>   File "prova.py", line 5, in <module>
>>>     conn = libvirt.open("vbox:///session")
>>>   File "/usr/lib/python2.6/dist-packages/libvirt.py", line 163, in open
>>>     if ret is None:raise libvirtError('virConnectOpen() failed')
>>> libvirt.libvirtError: internal error unable to initialize VirtualBox
>>> driver
>>> API
>>>
>>> why?
>>>
>>
>>This error basically says, that libvirt doesn't support your VirtualBox
>> version.
>>
>>What libvirt and VirtualBox version do you use?
>>
>>Matthias
>
>
> libvirt 0.7.0
> virtualbox 3.2
>
> Angelo
>

libvirt currently supports up to VirtualBox 3.1 and needs to be
updated to support 3.2.

I've CCed the VirtualBox driver maintainer.

Matthias