From: Prateek Sharma Subject: Re: VM checkpoint image format Date: Sun, 22 Dec 2013 16:45:20 -0500 (EST) Message-ID: References: <52B70563.6090907@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <52B70563.6090907@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper Cc: xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Sun, 22 Dec 2013, Andrew Cooper wrote: > On 21/12/2013 16:31, Prateek Sharma wrote: >> Hello all, >> Is the VM-save image format specified anywhere? (the file written >> to by xc_domain_save). I am looking for what fields are saved in what >> order. >> Or is the xc_domain_save function itself the specification? Can I >> change the order of fields saved (thus changing the on-disk image >> format) and expect no breakages? Ofcourse, I will need to change the >> xc_domain_restore function as well. >> >> Thanks! >> --Prateek > > There is no documentation that I am aware of, other than the code > itself, and the code is a rats nest. The format itself is quite lacking > in terms of extensibility, and makes some assumptions which are not > actually accurate. > > In my copious free time (of which I have none), or when XenServer > decided that it actually wants migration which works in combination with > ballooning (or any of the other more interesting memory modes), I have a > plan to make a "migration protocol v2" which shall be formally specified > in a document, and have ample room for forward extensibility in a > backward compatible manner. > > > As for changing the order of things. So long as your xc_domain_save() > and xc_domain_restore() have similar expectations of what order to > put/find chunks of the stream, it should work fine. It would help if > you described what changes you wish to make. We might be able to point > you at the correct area. > > ~Andrew > I'm attempting to implement VM lazy-restore. To achieve that, it would be nice if page-table pages, vcpu state, GDT pages, etc are located _before_ the rest of the pages. Is there some implicit dependency in the ordering of pages and the VCPU context? Is there a way to access (and hence save) all the page-table pages of a guest? Thanks! --Prateek