[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt-users] Defined VM goes missing in multi-threaded environment.

In a multi-threaded environment where multiple threads are trying to get
list of all VMs on host, we have seen that at times this list is missing
couple of VMs. The code used is fairly simple, it makes three libvirt

1. Call virConnectNumOfDefinedDomains() to get number of defined domains.

2. Call virConnectNumOfDomains() to get a list of active domains.

3. If there are defined domains, then call virConnectListDefinedDomains
(conn, (char **)names, n_names), where n_names is the count returned from

The count returned from #3 is less than the one returned from #1.

I have bumped up the connection count in libvirtd.conf to 100, and using 20
threads. On average I get one missing defined VM every 5 runs of this test.

I have 25 running VMs and 8 defined VMs  on this host.

# rpm -aq | grep libvirt

Its RHEL 6.1 running 2.6.32-131.17.1.el6.x86_64

Sharad Mishra

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]