[libvirt-users] What is the procedure of libvirt internal when you run a domain.
Eric Blake
eblake at redhat.com
Tue Jul 10 13:24:04 UTC 2012
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>
More information about the libvirt-users
mailing list