Hi All, I would like to understand the method used by Xen to Save/Restore domains. As far as I tried... most of the code is written in python and exists in lib/python/xen/sv/ directory. I am not much familier with python, but this code rather looks primitive and my feeling is that the code that actually saves the state is somewhere else, but I am not able to figure out where? I would really appreciate it if somebody can point me to the right directory. Also, if you know of the method for saving (like dump etc.), I would greatly appreciate it if you could guide me. Regards, Chotu ------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
> I would like to understand the method used by Xen to Save/Restore domains. > As far as I tried... most of the code is written in python and exists in > lib/python/xen/sv/ directory. I am not much familier with python, but this* SV is the (experimental) web interface and is located in tools/python/xen/sv/. * Xend is the control daemon and handles all sorts of control-plane things including receiving commands from SV and the xm command line tool and dispatching them to the rest of the system. Xend lives in tools/python/xen/xend/. * Xfrd is the migration / suspend daemon and is written in C for performance reasons. It accepts commands dispatched from Xend itself. It lives in tools/xfrd/ and contains the actual code for suspending / migrating a domain. HTH, Mark ------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
Mark Williamson <maw48 <at> cl.cam.ac.uk> writes:> > I would like to understand the method used by Xen to Save/Restore domains. > > As far as I tried... most of the code is written in python and exists in > > lib/python/xen/sv/ directory. I am not much familier with python, but this > > * SV is the (experimental) web interface and is located in > tools/python/xen/sv/. > * Xend is the control daemon and handles all sorts of control-plane things > including receiving commands from SV and the xm command line tool and > dispatching them to the rest of the system. Xend lives in > tools/python/xen/xend/. > * Xfrd is the migration / suspend daemon and is written in C for performance > reasons. It accepts commands dispatched from Xend itself. It lives in > tools/xfrd/ and contains the actual code for suspending / migrating a domain. > > HTH, > MarkHi Mark, Thanks for that info. I would like to know if it makes any sense to be able to figure out the process table information from the saved image of the VM. I am still not too sure about the save operation, but feel that it is more or less a memory dump. If that is the case, then hypervisor would copy the image back ad somehow restart the VM. Could you enlighten me about how does the hypervisor advises (or triggers) the VM so that its running... how are the registers saved and restored. I know these questions might seem little novice but I am still learning Xen and not sure about the structure of the code. Also, is there any official documentation available for the code structure (apart from the interface manual). How do you put the VM into pause domain? and whats the advantage of putting it in pause? does it freeze all the processes and restricts the CPU cycles alloted to it? If that is the case, is there a way to be able to read this frozen state information using hypervisor. I would really appreciate any help in this regard. Chotu ------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
> memory dump. If that is the case, then hypervisor would copy the image back > ad somehow restart the VM. Could you enlighten me about how does the > hypervisor advises (or triggers) the VM so that its running...Suspending a domain requires some co-operation from the guest OS - there was some other recent discussion on the mailing list about this. You don''t just pause the guest and save it but you also send it a control interface message telling it to suspend. When the guest OS is ready to be suspended, it makes a "suspend" hypercall into Xen. The domain is then descheduled and dom0 is allowed to suspend the domain, saving the memory and register state. When the domain is restored and starts executing again, it sees the "suspend hypercall" as just having returned. From the guest''s point of view, it just did a normal hypercall but afterwards it executes various resume functions to connect up its devices, sort out time, etc.> how are the > registers saved and restoredOffhand I don''t know the exact mechanism but IIRC, there''s a dom0 op that can optionally retrieve a domain''s memory state.> I know these questions might seem little > novice but I am still learning Xen and not sure about the structure of the > code.Not at all, this is relatively complex stuff.> Also, is there any official documentation available for the code > structure (apart from the interface manual).Nothing apart from what''s in the docs/ directory. There''s one or two text files in there also describing stuff.> How do you put the VM into pause domain? and whats the advantage of putting > it in pause? does it freeze all the processes and restricts the CPU cycles > alloted to it?Pause just stops it being scheduled.> If that is the case, is there a way to be able to read this > frozen state information using hypervisor.As above, I think you can just use a dom0 op.> I would really appreciate any help in this regard.HTH, Mark> Chotu > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting > Tool for open source databases. Create drag-&-drop reports. Save time > by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. > Download a FREE copy at http://www.intelliview.com/go/osdn_nl > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/xen-devel------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel