This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


Re: [Xen-devel] question about reboot VM

On Mon, Mar 26, 2007 at 02:12:33PM +0800, tgh wrote:

> hi
> I try to understand the"xm reboot" for vm, but confused about the python
> code
> I could not find which function or code in C language is called by the
> python when rebooting

At the client (xm) the code is in xen/xm/shutdown.py.  This just sends simple
messages to Xend (the server).  In Xend there is some marshalling, but
eventually the call pops out in xen/xend/XendDomainInfo.py:shutdown, with the
reason set to "reboot".  This makes a request to the domain to shut itself
down, and the shutdown the proceeds asynchronously.

When the domain finally shuts down, a watch is fired which comes into
XendDomainInfo.refreshShutdown, and Xend handles the cleanup and reboot from

There is no C code explicitly about rebooting -- this is handled by Xend as a
cleanup of one domain, and creation of a new one in its place.



Xen-devel mailing list

<Prev in Thread] Current Thread [Next in Thread>