何鑫
2012-Aug-08 07:08 UTC
[libvirt-users] How the libvirtd connect to qemud in source codes?
Hi, I meet a question when reading the libvirt source codes. Could you help me? Coz I plan to link libvirt to a Android Emulator based on QEMU, knowing how the libvirtd connect to qemud is important. I trace the code as following: libvirtd.c contains all the initilization of libvirt daemon, then calling function named qemuRegister to qemu_driver.c which contains three methods:int qemuRegister(void) { virRegisterDriver(&qemuDriver); virRegisterStateDriver(&qemuStateDriver); virNWFilterRegisterCallbackDriver(&qemuCallbackDriver); return 0; } In qemuDriver, I find a function --qemudOpen which, I guess, contains the method what I want. But I failed to find right messages. Could you please give me some tips? I guess there has got to contain related interfaces to connect between libvirt and qemu. Thanks a lot! -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20120808/1a018198/attachment.htm>
Eric Blake
2012-Aug-08 14:53 UTC
[libvirt-users] How the libvirtd connect to qemud in source codes?
On 08/08/2012 01:08 AM, ?? wrote:> Hi, I meet a question when reading the libvirt source codes. Could you help me? Coz I plan to link libvirt to a Android Emulator based on QEMU, knowing how the libvirtd connect to qemud is important. I trace the code as following: libvirtd.c contains all the initilization of libvirt daemon, then calling function named qemuRegister to qemu_driver.c which contains three methods:int qemuRegister(void) { virRegisterDriver(&qemuDriver); virRegisterStateDriver(&qemuStateDriver); virNWFilterRegisterCallbackDriver(&qemuCallbackDriver); return 0; } > In qemuDriver, I find a function --qemudOpen which, I guess, contains the method what I want. But I failed to find right messages. Could you please give me some tips? I guess there has got to contain related interfaces to connect between libvirt and qemu. Thanks a lot!You are probably most interested in src/qemu/qemu_command.c, which constructs the command lines used to invoke the appropriate qemu process. -- Eric Blake eblake at redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 620 bytes Desc: OpenPGP digital signature URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20120808/50b44b9b/attachment.sig>