2010/11/12 Feng Dan Liu <liufengd(a)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