public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* migration with exec giving truncated images
@ 2007-08-02 21:02 Jim Paris
       [not found] ` <20070802210226.GA29753-lSbMZ+N7itA@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Jim Paris @ 2007-08-02 21:02 UTC (permalink / raw)
  To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

http://kvm.qumranet.com/kvmwiki/Migration suggests to use
 
  stop
  migrate "exec:dd of=STATEFILE"

to save an image that can be loaded later.  I was having trouble
getting this to work (loading gave "Migration failed rc=233") and
discovered that not all of the data was being saved, probably because
of some buffering/pipe issues.  I ran the following commands:

  (qemu) stop
  (qemu) migrate "exec:dd of=/tmp/jr1"
  (qemu) migrate "exec:cat > /tmp/jr2" 
  (qemu) migrate "exec:dd bs=1 of=/tmp/jr3"

And the file sizes:

  $ ls -al /tmp/jr[123]
  -rw-r--r--  1 root root    86061424 2007-08-02 16:52 jr1
  -rw-r--r--  1 root root    86220963 2007-08-02 16:53 jr2
  -rw-r--r--  1 root root    86220963 2007-08-02 16:56 jr3

Sometimes the "cat" gives a filesize similar to "dd", depending on
image size.  Only "dd bs=1" appears to always give me all of the data.
Sometimes the truncated images work fine for resume, other times they
cause a "migration failed".

I haven't had a chance yet to dig too deep in the source to find the
cause.  I haven't seeen if this truncation also happens over TCP.

This was tested with kvm-28 modules and both kvm-28 and kvm-33
userspace.  Has anyone else seen this?

-jim

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/

^ permalink raw reply	[flat|nested] 8+ messages in thread
* Re: migration with exec giving truncated images
@ 2007-08-08 20:22 Jim Paris
       [not found] ` <1186604569626-git-send-email-jim-XrPbb/hENzg@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Jim Paris @ 2007-08-08 20:22 UTC (permalink / raw)
  To: Uri Lublin, kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

I think I've (finally!) tracked it down.  See the attached patches.

The main problem is this: when using "-monitor pty", all incoming
commands are terminated with CRLF even though they were sent with just
LF, probably because of the pty layer somewhere.  When qemu's readline
gets CR and LF without calling readline_start() in between, it
executes the same command twice in a row, which meant that _two_
migrations were running concurrently.

-jim

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2007-08-14  4:49 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-02 21:02 migration with exec giving truncated images Jim Paris
     [not found] ` <20070802210226.GA29753-lSbMZ+N7itA@public.gmane.org>
2007-08-03 18:23   ` Jim Paris
     [not found]     ` <20070803182333.GA15267-lSbMZ+N7itA@public.gmane.org>
2007-08-07 18:28       ` Jim Paris
     [not found]         ` <20070807182826.GA30737-lSbMZ+N7itA@public.gmane.org>
2007-08-08  9:14           ` Uri Lublin
  -- strict thread matches above, loose matches on Subject: below --
2007-08-08 20:22 Jim Paris
     [not found] ` <1186604569626-git-send-email-jim-XrPbb/hENzg@public.gmane.org>
2007-08-09 12:24   ` Uri Lublin
     [not found]     ` <46BB0760.80405-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-08-14  3:56       ` Jim Paris
     [not found]         ` <20070814035659.GA10726-lSbMZ+N7itA@public.gmane.org>
2007-08-14  4:49           ` Jim Paris

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox