xuanmao_001
2012-Jul-10 13:00 UTC
[libvirt-users] What is the procedure of libvirt internal when you run a domain.
Hi, all. I want to know when I press run button. start a domain. What is the procedure of libvirt internal. I know it will call virDomainCreate(),then qemuDomainStart() -> qemuDomainStartWithFlags(). what is the next? xuanmao_001 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20120710/b6547219/attachment.htm>
Eric Blake
2012-Jul-10 13:24 UTC
[libvirt-users] What is the procedure of libvirt internal when you run a domain.
On 07/10/2012 07:00 AM, xuanmao_001 wrote:> Hi, all. > I want to know when I press run button. start a domain. What is the procedure of libvirt internal. > I know it will call virDomainCreate(),then qemuDomainStart() -> qemuDomainStartWithFlags(). what is the next?I'm assuming you pushed the run button within virt-manager or some other gui. This makes a call into libvirt.so virDomainCreate(), which then bundles the arguments into an RPC call to pass to libvirtd using the code in src/remote. Then libvirtd (the code in daemon/) unbundles the RPC call, calls its own copy of virDomainCreate(), which then forwards into qemuDomainStart() (src/qemu). So you got that part correct. Within the body of qemuDomainStart() are calls to helper functions to build the command line (src/qemu/qemu_command.c) as well as creating the qemu process (src/qemu/qemu_process.c) and associated monitor connection (src/qemu/qemu_monitor.c). You can view the guest log to see the command line that was created. Beyond that, I'd suggest you compile your own version of libvirtd with CFLAGS=-O0, then step through virDomainCreate() under gdb if you really want to know what's happening. -- 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/20120710/391e8ae8/attachment.sig>
Seemingly Similar Threads
- Re: QEMU interface type=ethernet
- Which functions call qemu_driver API?
- can not connect hypervisor using libvirt-0.9.8 on windows
- Does Libvirt-0.8.8(windows) support URI like qemu+ssh on windows?
- [BUG] Not exiting media forced a promptly close of libvirt 3.10