This is my second attempt at this. The first version (also not working) was here: https://www.redhat.com/archives/libguestfs/2019-October/msg00062.html In part 1/2 I introduce a new .ready_to_serve plugin method which is called after forking and just before accepting any client connection. The idea would be that plugins could start background threads here. However this doesn't work well in practice because plugins which do start any background threads seem to always get a segfault at shutdown, with a race between __nptl_deallocate_tsd and some code being unloaded (I'm not sure exactly what). Part 2/2 restructures the VDDK plugin. This time I fixed the message passing so it doesn't deadlock as it did before. I thought that this patch might have solved the other VDDK problem we have around "Resolve Host" taking so long, but in fact it does not fix that either. (VDDK is still broken, news as 11). Anyway I don't think there's anything worth saving here. I'm mainly posting it so we have a back up. Rich.