[libvirt] Ask for help about libvirt error: this function is not supported by the connection driver..

Hi, I'm a libvirt user, I encountered a problem when I use the libvirt java bindings, could you please help me take a look? Thanks in advance! Any suggestions from anyone of you will be very appreciated. Here is my scenario: Remote access machine A is a RHEL 5.4 workstation with the command "virsh version" results: Compiled against library: libvir 0.8.1 Using library: libvir 0.8.1 Using API: Xen 3.0.1 Running hypervisor: Xen 3.1.0 Hypervisor machine B is a Fedora Core 14 Linux workstation with the command "virsh version" results: Compiled against library: libvir 0.8.3 Using library: libvir 0.8.3 Using API: QEMU 0.8.3 Running hypervisor: QEMU 0.13.0 I finished the code using libvirt java bindings and run it on machine A, try to remote connect to the hypervisor on machine B. It can be connected succussfully, but when the code calls the function of conn.listDefinedStoragePools() or conn.listStoragePools, the libvirt on machine B will get the errors below: 04:19:10.467: error : phypStorageOpen:3884 : invalid argument in phypStorageOpen: unsupported flags (0x1) 04:19:11.354: warning : qemudParsePCIDeviceStrs:1422 : Unexpected exit status '1', qemu probably failed 04:19:12.128: error : virLibConnError:448 : this function is not supported by the connection driver: virConnectNumOfStoragePools With the errors above, my code can't run the functions of conn.listDefinedStoragePools() or conn.listStoragePools successfully. Could you please give me some suggestions? By the way, I try to use the libvirt java bindings 0.3.2 and 0.4.6, both of them have this problem. Best Regards, Fengdan Liu, Casey AdTech, Tivoli China Development, China Software Development Lab, IBM Greater China Group Phone: 86-10-82453004 Email: liufengd@cn.ibm.com Addr: No.28 Building, Zhong Guan Cun Software Park, No. 8 Dong Bei Wang West Road, ShangDi, Haidian District, Beijing 100193, P.R.China

2010/11/12 Feng Dan Liu <liufengd@cn.ibm.com>:
Hi,
I'm a libvirt user, I encountered a problem when I use the libvirt java bindings, could you please help me take a look? Thanks in advance! Any suggestions from anyone of you will be very appreciated.
I finished the code using libvirt java bindings and run it on machine A, try to remote connect to the hypervisor on machine B. It can be connected succussfully, but when the code calls the function of conn.listDefinedStoragePools() or conn.listStoragePools, the libvirt on machine B will get the errors below:
04:19:10.467: error : phypStorageOpen:3884 : invalid argument in phypStorageOpen: unsupported flags (0x1) 04:19:11.354: warning : qemudParsePCIDeviceStrs:1422 : Unexpected exit status '1', qemu probably failed 04:19:12.128: error : virLibConnError:448 : this function is not supported by the connection driver: virConnectNumOfStoragePools
With the errors above, my code can't run the functions of conn.listDefinedStoragePools() or conn.listStoragePools successfully.
Could you please give me some suggestions?
By the way, I try to use the libvirt java bindings 0.3.2 and 0.4.6, both of them have this problem.
The problem is not in the Java bindings, the problem is in libvirt.
From your log messages I can see that you use a read-only connection. The PHYP storage driver fails to open for a read-only connection. This results in a connection with no storage driver, resulting in the virConnectNumOfStoragePools-not-supported message you see.
I posted a patch [1] that fixes this problem. As a temporary workaround you could use a normal (non-read-only) connection, as the problem only occurs for a read-only connection. [1] https://www.redhat.com/archives/libvir-list/2010-November/msg00531.html Matthias

Hi, Matthias, I see, thank you very much for your quick response! Best Regards, Fengdan Liu, Casey AdTech, Tivoli China Development, China Software Development Lab, IBM Greater China Group Phone: 86-10-82453004 Email: liufengd@cn.ibm.com Addr: No.28 Building, Zhong Guan Cun Software Park, No. 8 Dong Bei Wang West Road, ShangDi, Haidian District, Beijing 100193, P.R.China Matthias Bolte <matthias.bolte@googlemail.com> 2010-11-12 21:11 To Feng Dan Liu/China/IBM@IBMCN cc libvir-list@redhat.com, Todd Gatts <tgatts@us.ibm.com> Subject Re: [libvirt] Ask for help about libvirt error: this function is not supported by the connection driver.. 2010/11/12 Feng Dan Liu <liufengd@cn.ibm.com>:
Hi,
I'm a libvirt user, I encountered a problem when I use the libvirt java bindings, could you please help me take a look? Thanks in advance! Any suggestions from anyone of you will be very appreciated.
I finished the code using libvirt java bindings and run it on machine A,
try
to remote connect to the hypervisor on machine B. It can be connected succussfully, but when the code calls the function of conn.listDefinedStoragePools() or conn.listStoragePools, the libvirt on machine B will get the errors below:
04:19:10.467: error : phypStorageOpen:3884 : invalid argument in phypStorageOpen: unsupported flags (0x1) 04:19:11.354: warning : qemudParsePCIDeviceStrs:1422 : Unexpected exit status '1', qemu probably failed 04:19:12.128: error : virLibConnError:448 : this function is not supported by the connection driver: virConnectNumOfStoragePools
With the errors above, my code can't run the functions of conn.listDefinedStoragePools() or conn.listStoragePools successfully.
Could you please give me some suggestions?
By the way, I try to use the libvirt java bindings 0.3.2 and 0.4.6, both of them have this problem.
The problem is not in the Java bindings, the problem is in libvirt.
From your log messages I can see that you use a read-only connection. The PHYP storage driver fails to open for a read-only connection. This results in a connection with no storage driver, resulting in the virConnectNumOfStoragePools-not-supported message you see.
I posted a patch [1] that fixes this problem. As a temporary workaround you could use a normal (non-read-only) connection, as the problem only occurs for a read-only connection. [1] https://www.redhat.com/archives/libvir-list/2010-November/msg00531.html Matthias
participants (2)
-
Feng Dan Liu
-
Matthias Bolte