Re: [Libvir] save/restore support for KVM

2007-08-12 Thread Jim Paris
Hi Daniel, Thanks for the quick reply. Things seem to be working well now, Main changes from last time: - Fixed issues with the QEMU monitor interface: - Due to the TTY layer, sending "\n" to the qemu monitor translates into "\r\n" when received. This triggers a bug in older versions

Re: [Libvir] save/restore support for KVM

2007-08-11 Thread Daniel P. Berrange
On Sat, Aug 11, 2007 at 03:16:38PM -0400, Jim Paris wrote: > Daniel Veillard wrote: > > On Fri, Aug 10, 2007 at 12:36:05PM -0400, Jim Paris wrote: > > > I think appending unrelated data to the migration image is a bit of a > > > hack anyway. A better plan would be a file containing > > > > >

Re: [Libvir] save/restore support for KVM

2007-08-11 Thread Jim Paris
Daniel Veillard wrote: > On Fri, Aug 10, 2007 at 12:36:05PM -0400, Jim Paris wrote: > > I think appending unrelated data to the migration image is a bit of a > > hack anyway. A better plan would be a file containing > > > > Hum, beware you then need to make sure that you indicate in the >

Re: [Libvir] save/restore support for KVM

2007-08-10 Thread Daniel Veillard
On Fri, Aug 10, 2007 at 12:36:05PM -0400, Jim Paris wrote: > > if it's okay to add a variable lenght data structure at the end, they might > > want to extend it in the future and that would be hard to handle. > > I think appending unrelated data to the migration image is a bit of a > hack anyway.

Re: [Libvir] save/restore support for KVM

2007-08-10 Thread Daniel P. Berrange
On Fri, Aug 10, 2007 at 12:36:05PM -0400, Jim Paris wrote: > Daniel Veillard wrote: > > On Thu, Aug 09, 2007 at 10:55:10PM +0100, Daniel P. Berrange wrote: > > > Just been committed to KVM repos I see. Should be an easy patch to > > > backport > > > too. As long as we can detect failure if this is

Re: [Libvir] save/restore support for KVM

2007-08-10 Thread Jim Paris
Daniel Veillard wrote: > On Thu, Aug 09, 2007 at 10:55:10PM +0100, Daniel P. Berrange wrote: > > Just been committed to KVM repos I see. Should be an easy patch to backport > > too. As long as we can detect failure if this is missing & report it back > > then I'm fine depending on this. > > Wou

Re: [Libvir] save/restore support for KVM

2007-08-10 Thread Jim Paris
Richard W.M. Jones wrote: > Jim Paris wrote: > >+if (strchr(path, '\'') || strchr(path, '\\') ) { > >+qemudReportError(dom->conn, dom, NULL, VIR_ERR_OPERATION_FAILED, > >+ "invalid filename"); > >+return -1; > >+} > [...] > >+/* Migrate to file. *

Re: [Libvir] save/restore support for KVM

2007-08-10 Thread Daniel P. Berrange
On Fri, Aug 10, 2007 at 11:06:02AM +0100, Richard W.M. Jones wrote: > Daniel P. Berrange wrote: > >>- I append the domain's UUID at the end of the migration image. > >> This doesn't affect KVM at all (it ignores the extra data). > >> Does that seem reasonable? It's unclear how the saved image >

Re: [Libvir] save/restore support for KVM

2007-08-10 Thread Daniel Veillard
On Thu, Aug 09, 2007 at 10:55:10PM +0100, Daniel P. Berrange wrote: > On Thu, Aug 09, 2007 at 05:26:43PM -0400, Jim Paris wrote: > > Hi, > > > > I've implemented save/restore support for KVM using the live migration > > feature. First, a few patches to KVM to fix bugs: Very cool :-) > > Then,

Re: [Libvir] save/restore support for KVM

2007-08-10 Thread Richard W.M. Jones
Daniel P. Berrange wrote: - I append the domain's UUID at the end of the migration image. This doesn't affect KVM at all (it ignores the extra data). Does that seem reasonable? It's unclear how the saved image is supposed to get associated with a particular VM configuration without doin

Re: [Libvir] save/restore support for KVM

2007-08-10 Thread Richard W.M. Jones
Jim Paris wrote: +if (strchr(path, '\'') || strchr(path, '\\') ) { +qemudReportError(dom->conn, dom, NULL, VIR_ERR_OPERATION_FAILED, + "invalid filename"); +return -1; +} [...] +/* Migrate to file. */ +if (asprintf (&command, "migrate \"ex

Re: [Libvir] save/restore support for KVM

2007-08-09 Thread Daniel P. Berrange
On Thu, Aug 09, 2007 at 05:26:43PM -0400, Jim Paris wrote: > Hi, > > I've implemented save/restore support for KVM using the live migration > feature. First, a few patches to KVM to fix bugs: > > Subject: [PATCH 1/3] qemu: fix freed pointer dereference > http://article.gmane.org/gmane.comp.e

[Libvir] save/restore support for KVM

2007-08-09 Thread Jim Paris
Hi, I've implemented save/restore support for KVM using the live migration feature. First, a few patches to KVM to fix bugs: Subject: [PATCH 1/3] qemu: fix freed pointer dereference http://article.gmane.org/gmane.comp.emulators.kvm.devel/5572 Subject: [PATCH 2/3] qemu: don't start a new m