[libvirt] Using virtEvents in macvtap setup code

Dirk Herrendoerfer herrend at acmelabs.de
Thu Dec 22 17:04:29 UTC 2011

Hi all,

I'm trying to get libvirt to re-associate lost connections when a vepa  
is lost due to a switch error, or lldpad restart.

My take was to use the virtEvent infrastructure to poll for messages  
on a netlink
socket and then restart the association if the message indicates that  
a link came
back up.

I ran into a problem, that if I start the polling netlink event from  
the daemon thread
I would get the file events an the netlink messages, but I cannot  
configure the
event handler because the rpc client threads and the daemon do not  
share the
same address space.

Is there a way to get file events in the VMs setup code so I can  
register a callback
at VM initialization time to receive netlink messages and restart  
association if needed ?

Best regards,

D.Herrendoerfer <herrend at de dot ibm dot com > <d.herrendoerfer at  
herrendoerfer dot name>

More information about the libvir-list mailing list