|
|
|
|
|
|
|
|
|
|
xen-devel
Re: [Xen-devel] migration and restore?
On Tue, 2008-01-08 at 13:16 +0100, Andre Przywara wrote:
> > i read the code of migration, and i fail to find the counterpart code of
> > migration , which deal with the restoration of VM in the destination
> > node, and i read the code of /tools/libxc/xc_domain_restore.c ,but the
> > function of xc_domain_restore() seems not to be the one for the
> > migration, it seems not support the restore of the iterative copy of the
> > VM memory state ,is it? or how does it deal with the work?
>
> Maybe the missing pieces you are looking for are in the xend (Python)
> code? In line 205 (or so) in tools/pyhton/xen/xend/XendDomainInfo.py you
> will find the high level function "restore". This method calls
> XendDomainInfo.resume (line 446) and triggers the necessary actions
> here. Another file to look in is XendCheckpoint.py, here you'll find the
> method "restore" (line 154). Some Migration code is also in XendDomain.py.
> You can get more info if you enable debugging, do a live migration (to
> localhost) and look in xend.log for "Saving memory pages" or "Reloading
> memory pages". From here you will find the corresponding code (maybe by
> just grepping for the log message text).
> I found line 427 in xc_domain_restore.c, the code following this line
> deals with the restoring of the frames. From my perspective there is
> everything needed in there.
this is correct, the iteration is definitely done in
xc_domain_restore().
the for loop as described above follows iteration as dictated by the
source machine. each interation generates a number of batches, each
batch comprising a number of pages, either first try or (later) resent
due to being dirtied. each batch is dispatched in several passes. the
second pass generates the machine frame list into which the batch is
read. the most interesting part where that memory is mapped and filled
with frame contents starts in line 533 (xc_map_foreign_range) and the
subsequent for-loop in line 544 resp.
complete enough to follow without the addtional setup done by xend.
tools/xcutils/ contains C programs calling into the library for save and
restore. should be easy to call from the command line once the parameter
meanings are understood; i'd suggest to build with debug output enabled
and follow the stderr messages to see how it works.
regards,
daniel
--
dns@xxxxxxxxxxxx
Wire up your home and stay there.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|