[libvirt-users] release open_disk error
by Frido Roose
Hello,
I wonder what the "open error -1" / "release open_disk error" messages in sanlock.log actually mean.
I saw these messages in the log on a KVM host that rebooted, and after running "/usr/sbin/virt-sanlock-cleanup" on that host.
The resources where disks from 2 guests running on another KVM host.
So in fact the disks are still in use, bot got cleaned up by the other KVM host because it thought they were not longer in use...
Several questions:
1. Could this indicate a problem with the lease of these resources on the server that host these guests?
2. Is there a way to reregister these resources, because they are still in use (but not for sanlock it seems)?
3. Overall, is it a bad idea to run virt-sanlock-cleanup?
Some entries from the log file:
538 s1:r35 resource __LIBVIRT__DISKS__:e133401bfdff6979f76d9544ec8a5529:/var/lib/libvirt/sanlock/e133401bfdff6979f76d9544ec8a5529:0 for 1,9,4218
539 open error -1 /var/lib/libvirt/sanlock/e133401bfdff6979f76d9544ec8a5529
539 r35 release open_disk error /var/lib/libvirt/sanlock/e133401bfdff6979f76d9544ec8a5529
598 s1:r40 resource __LIBVIRT__DISKS__:fc82f9999b5afddb8aee9955db9b3477:/var/lib/libvirt/sanlock/fc82f9999b5afddb8aee9955db9b3477:0 for 2,12,4230
598 open error -1 /var/lib/libvirt/sanlock/fc82f9999b5afddb8aee9955db9b3477
598 r40 release open_disk error /var/lib/libvirt/sanlock/fc82f9999b5afddb8aee9955db9b3477
598 s1:r42 resource __LIBVIRT__DISKS__:ff9b82672a4dd869f9c9b38a6cbe3900:/var/lib/libvirt/sanlock/ff9b82672a4dd869f9c9b38a6cbe3900:0 for 2,12,4232
598 open error -1 /var/lib/libvirt/sanlock/ff9b82672a4dd869f9c9b38a6cbe3900
598 r42 release open_disk error /var/lib/libvirt/sanlock/ff9b82672a4dd869f9c9b38a6cbe3900
--
Frido Roose
12 years, 6 months
[libvirt-users] creating a domain
by John Wayne
hi,
i am a bit confused on how to start an inactive domain using the python bindings, any help would be appreciated.
(inactive as in the domain was created with virConnect.defineXML sometime in the past)
looks like i have to use virDomain.create, however virDomain.create needs a defined domain xmldesc as a parameter and i am not sure on how to get that
i guess if virConnect.create was happening right after virConnect.defineXML i could get the return value of virConnect.defineXML and pass that onto virDomain.create.
however, since the domain was created sometime in the past, i am not sure on how to get the domain ptr which virDomain.create needs
thanks
12 years, 6 months
[libvirt-users] Libvirt java binding crash Tomcat
by Hubert Zhang
Running on linux and libvirt 0.9.11. Using libvirt java 0.4.7. Notice that the Tomcat server crashes and shows the dump like this:
*** glibc detected *** jsvc.exec: double free or corruption (out): 0x086f14a8 ***
======= Backtrace: =========
/lib/libc.so.6[0xc03745]
/lib/libc.so.6(cfree+0x59)[0xc03b89]
/tmp/jna/jna486823639517928939.tmp(Java_com_sun_jna_Native_free+0x1d)[0x430c4c]
[0xb46de240]
[0xb46d218d]
[0xb46d218d]
[0xb46d218d]
[0xb46cf3e6]
/usr/lib/jvm/sun-java-6u24/jre/lib/i386/server/libjvm.so[0x13bdb21]
/usr/lib/jvm/sun-java-6u24/jre/lib/i386/server/libjvm.so[0x15b3478]
/usr/lib/jvm/sun-java-6u24/jre/lib/i386/server/libjvm.so[0x13bd94f]
/usr/lib/jvm/sun-java-6u24/jre/lib/i386/server/libjvm.so[0x13f0ef7]
/usr/lib/jvm/sun-java-6u24/jre/lib/i386/server/libjvm.so[0x13d4aee]
/usr/lib/jvm/sun-java-6u24/jre/lib/i386/libjava.so(Java_java_lang_ref_Finalizer_invokeFinalizeMethod+0x6e)[0x11cb3e]
[0xb46de240]
[0xb46d218d]
[0xb46d218d]
[0xb46d218d]
[0xb46cf3e6]
/usr/lib/jvm/sun-java-6u24/jre/lib/i386/server/libjvm.so[0x13bdb21]
/usr/lib/jvm/sun-java-6u24/jre/lib/i386/server/libjvm.so[0x15b3478]
/usr/lib/jvm/sun-java-6u24/jre/lib/i386/server/libjvm.so[0x13bd395]
/usr/lib/jvm/sun-java-6u24/jre/lib/i386/server/libjvm.so[0x13bd458]
/usr/lib/jvm/sun-java-6u24/jre/lib/i386/server/libjvm.so[0x143fbe7]
/usr/lib/jvm/sun-java-6u24/jre/lib/i386/server/libjvm.so[0x16b404f]
/usr/lib/jvm/sun-java-6u24/jre/lib/i386/server/libjvm.so[0x15b4a6e]
/lib/libpthread.so.0[0x8fa842]
/lib/libc.so.6(clone+0x5e)[0xc6c4ce]
======= Memory map: ========
00110000-00133000 r-xp 00000000 08:01 106948 /usr/lib/jvm/sun-java-6u24/jre/lib/i386/libjava.so
00133000-00135000 rw-p 00023000 08:01 106948 /usr/lib/jvm/sun-java-6u24/jre/lib/i386/libjava.so
00135000-00148000 r-xp 00000000 08:01 74629 /lib/libnsl-2.5.so
00148000-00149000 r--p 00012000 08:01 74629 /lib/libnsl-2.5.so
00149000-0014a000 rw-p 00013000 08:01 74629 /lib/libnsl-2.5.so
0014a000-0014c000 rw-p 00000000 00:00 0
0014c000-0014f000 ---p 00000000 00:00 0
0014f000-0019d000 rwxp 00000000 00:00 0
0019d000-001d7000 r-xp 00000000 08:01 106944 /usr/lib/jvm/sun-java-6u24/jre/lib/i386/libjdwp.so
001d7000-001d8000 rw-p 00039000 08:01 106944 /usr/lib/jvm/sun-java-6u24/jre/lib/i386/libjdwp.so
001d8000-001d9000 ---p 00000000 00:00 0
001d9000-00259000 rwxp 00000000 00:00 0
00259000-0026d000 r-xp 00000000 08:01 106885 /usr/lib/jvm/sun-java-6u24/jre/lib/i386/libnet.so
0026d000-0026e000 rw-p 00013000 08:01 106885 /usr/lib/jvm/sun-java-6u24/jre/lib/i386/libnet.so
0026e000-00273000 r-xp 00000000 08:01 106769 /usr/lib/jvm/sun-java-6u24/jre/lib/i386/headless/libmawt.so
00273000-00274000 rw-p 00004000 08:01 106769 /usr/lib/jvm/sun-java-6u24/jre/lib/i386/headless/libmawt.so
00276000-00290000 r-xp 00000000 08:01 74651 /lib/ld-2.5.so
00290000-00291000 r--p 00019000 08:01 74651 /lib/ld-2.5.so
00291000-00292000 rw-p 0001a000 08:01 74651 /lib/ld-2.5.so
00292000-00295000 ---p 00000000 00:00 0
00295000-002e3000 rwxp 00000000 00:00 0
002e3000-002e8000 r-xp 00000000 08:01 212038 /usr/lib/libwsman_curl_client_transport.so.1.0.0
002e8000-002e9000 rw-p 00004000 08:01 212038 /usr/lib/libwsman_curl_client_transport.so.1.0.0
......................................
Sometimes I see "invalid pointer" as well. It seems a bug to the libvirt java API. Has anyone seen this error before? Thanks.
12 years, 6 months
[libvirt-users] SSH connection timeout
by Ananth
Hi,
I am trying to connect to libvirt on KVM host from a remote python client,
using the connection string "qemu+ssh://<IP Address>/system"
If I setup password less SSH (Public key) between the machines, I am able
to proceed with the connection. But If I have not setup the public key
authentication, my code hangs trying to connect to libvirt, and there is a
prompt for entering password in the shell where the code is running.
Is there any way to catch this in an exception and throw an error that
public key not setup or password not available? Or is it possible to
timeout and abort the request to connect to the host? Whatever timeout
variables available online seem to work only for an already active SSH
session to timeout.
Any pointers ?
--
Regards
Ananth
12 years, 6 months
[libvirt-users] Passing dhcp-options
by Michael Hierweck
Hi,
I'm running some Windows clients inside KVM virtual maschines managed by
libvirt. These clients are managed by a Samba 3 PDC. Therefore the DHCP
needs so supply corresponding WINS server (dhcp option 44) not only IP
address and DNS server.
Is it possible to make dnsmasq driven by libvirt to supply custom dhcp
options?
I would appreciate something like this in the network.xml:
[...]
<dhcp>
<range [...] />
<option key="key1">value1</option>
<option key="key2">value2</option>
[...]
</dhcp>
[...]
Is there any other solution? Using DHCP to configure clients does not
make sense when parts (WINS) of the IP configurations need to be hard
coded in the clients.
Thanks in advance
Michael
--
EDV-Serviceteam Annika & Michael Hierweck GbR
Egerstraße 53, 44225 Dortmund (Germany)
http://www.edv-serviceteam.net
12 years, 6 months
[libvirt-users] creation of storage volume fails
by John Wayne
hi,
i am getting this error below when i try to create a storage volume:
libvirt.virStoragePool.CreateXML(storagepoolobject,xmldesc,0)
AttributeError: class virStoragePool has no attribute 'CreateXML'
my code is:
xmldesc="xml description of storage volume which i got from sudo virsh vol-dumpxml"
#get a storage pool object to use in creating a volume
storagepoolobject=libvirt.virConnect.storagePoolLookupByName(conn,'poolname')
#now try to create the volume using the above storage pool object
libvirt.virStoragePool.CreateXML(storagepoolobject,xmldesc,0)
from python:
-bash-4.1$ python
>>> import libvirt
>>> dir(libvirt.virStoragePool)
['UUID', 'UUIDString', 'XMLDesc', '__del__', '__doc__', '__init__', '__module__', 'autostart', 'build', 'connect', 'create', 'createXML', 'createXMLFrom', 'delete', 'destroy', 'info', 'isActive', 'isPersistent', 'listVolumes', 'name', 'numOfVolumes', 'refresh', 'setAutostart', 'storageVolLookupByName', 'undefine']
>>> help(libvirt.virStoragePool.createXML)
Help on method createXML in module libvirt:
createXML(self, xmldesc, flags) unbound libvirt.virStoragePool method
Create a storage volume within a pool based
on an XML description. Not all pools support
creation of volumes
from the libvirt.org documentation:
http://libvirt.org/html/libvirt-libvirt.html#virStorageVolCreateXML
virStorageVolPtrvirStorageVolCreateXML(virStoragePoolPtr pool,
const char * xmldesc,
unsigned int flags)
Create a storage volume within a pool based on an XML description. Not all pools support creation of volumes
pool:pointer to storage pool
xmldesc:description of volume to create
flags:extra flags; not used yet, so callers should always pass 0
Returns:the storage volume, or NULL on error
12 years, 6 months
[libvirt-users] libvirt read only connections upgraded to full access connections
by Doug Goldstein
I've gone through the docs and the API and I didn't see a way to do
this but I wanted to confirm. My application gives a bunch of info on
the state of a VM that's available through a connection created
through libvirt.openReadOnly() but at some point the user might want
to restart the VM let's say. This requires a full privilege
connection, rather than opening a new connection I was hoping to
upgrade the existing one to a full privilege connection.
Just confirming that's not possible.
--
Doug Goldstein
12 years, 6 months