[libvirt] "state" drivers?

Laine Stump laine at laine.org
Mon Apr 13 15:39:45 UTC 2009


I'm looking through the network driver, and see the "state" driver 
registered. Several other drivers also register a state driver. What is 
this used for? It looks like it's handling a startup/shutdown at a more 
basic level than then open/close in the network (storage/qemu/etc) 
driver itself. Is it the case that things that should happen only once 
as libvirtd is loaded/unloaded should be put in the state driver's 
Startup/shutdown?

It seems possible that these callouts may be unnecessary in my case, 
since I'll be modifying the OS's own interface config, so the interfaces 
will already be up and running by the time libvirtd starts, and should 
remaining running after libvirtd is unloaded. (as for 
initializing/shutting down netcf, this may be useful for shutting it 
down before exit, but its init should probably only be called on demand 
if someone actually calls a virInterface* function -otherwise we're 
using up resources for nothing.

Any other guildelines/advice?




More information about the libvir-list mailing list