qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Steven Sistare <steven.sistare@oracle.com>
To: qemu-devel@nongnu.org
Cc: Juan Quintela <quintela@redhat.com>, Peter Xu <peterx@redhat.com>,
	Fabiano Rosas <farosas@suse.de>,
	Leonardo Bras <leobras@redhat.com>,
	"Daniel P. Berrange" <berrange@redhat.com>
Subject: Re: [PATCH V2 0/6] Live Update reboot mode
Date: Thu, 26 Oct 2023 16:10:15 -0400	[thread overview]
Message-ID: <7331cea3-58b0-4be1-bed5-ebf4441096b5@oracle.com> (raw)
In-Reply-To: <1698350913-415926-1-git-send-email-steven.sistare@oracle.com>

SORRY for the noise, I type the wrong send-mail command, please ignore this resend of V2 - steve

On 10/26/2023 4:08 PM, Steve Sistare wrote:
> Add a mode migration parameter that can be used to select alternate
> migration algorithms.  The default mode is normal, representing the
> current migration algorithm, and does not need to be explicitly set.
> 
> Provide the cpr-reboot (CheckPoint and Restart) migration mode for live
> update, which saves state to a file.  This allows one to quit qemu, reboot
> to an updated kernel, install an updated version of qemu, and resume via
> the migrate-incoming command.  The caller must specify a migration URI
> that writes to and reads from a file, and must set the mode parameter
> before invoking the migrate or migrate-incoming commands.
> 
> Unlike normal mode, the use of certain local storage options does not block
> cpr-reboot mode, but the caller must not modify guest block devices between
> the quit and restart.  To avoid saving guest RAM to the state file, the memory
> backend must be shared, and the @x-ignore-shared migration capability must
> be set.
> 
> Guest RAM must be non-volatile across reboot, which can be achieved by
> backing it with a dax device, or /dev/shm PKRAM as proposed in
> https://lore.kernel.org/lkml/1617140178-8773-1-git-send-email-anthony.yznaga@oracle.com
> but this is not enforced.  The restarted qemu arguments must match those used
> to initially start qemu, plus the -incoming option.
> 
> This patch series contains minimal functionality.  Future patches will enhance
> reboot mode by preserving vfio devices for suspended guests.  They will also
> add a new mode for updating qemu using the exec system call, which will keep
> vfio devices and certain character devices alive.
> 
> Here is an example of updating the host kernel using reboot mode.
> 
> window 1                                        | window 2
>                                                 |
> # qemu-system-$arch -monitor stdio              |
>   mem-path=/dev/dax0.0 ...                      |
> QEMU 8.1.50 monitor - type 'help' for more info |
> (qemu) info status                              |
> VM status: running                              |
>                                                 | # yum update kernel-uek
> (qemu) migrate_set_capability x-ignore-shared on|
> (qemu) migrate_set_parameter mode cpr-reboot    |
> (qemu) migrate -d file:vm.state                 |
> (qemu) info status                              |
> VM status: paused (postmigrate)                 |
> (qemu) quit                                     |
>                                                 |
> # systemctl kexec                               |
> kexec_core: Starting new kernel                 |
> ...                                             |
>                                                 |
> # qemu-system-$arch -monitor stdio              |
>   mem-path=/dev/dax0.0 -incoming defer ...      |
> QEMU 8.1.50 monitor - type 'help' for more info |
> (qemu) info status                              |
> VM status: paused (inmigrate)                   |
> (qemu) migrate_set_capability x-ignore-shared on|
> (qemu) migrate_set_parameter mode cpr-reboot    |
> (qemu) migrate_incoming file:vm.state           |
> (qemu) info status                              |
> VM status: running                              |
> 
> Changes in V2:
>   - moved "migration mode" code and comments to more appropriate places
>   - clarified the behavior of non-shared-memory backends
>   - split blocker patches and reverted some blockers
>   - added a test
> 
> Steve Sistare (6):
>   migration: mode parameter
>   migration: per-mode blockers
>   cpr: relax blockdev migration blockers
>   cpr: relax vhost migration blockers
>   cpr: reboot mode
>   tests/qtest: migration: add reboot mode test
> 
>  block/parallels.c                   |  2 +-
>  block/qcow.c                        |  2 +-
>  block/vdi.c                         |  2 +-
>  block/vhdx.c                        |  2 +-
>  block/vmdk.c                        |  2 +-
>  block/vpc.c                         |  2 +-
>  block/vvfat.c                       |  2 +-
>  hw/core/qdev-properties-system.c    | 14 ++++++
>  hw/scsi/vhost-scsi.c                |  2 +-
>  hw/virtio/vhost.c                   |  2 +-
>  include/hw/qdev-properties-system.h |  4 ++
>  include/migration/blocker.h         | 44 +++++++++++++++--
>  include/migration/misc.h            |  1 +
>  migration/migration-hmp-cmds.c      |  9 ++++
>  migration/migration.c               | 95 ++++++++++++++++++++++++++++++++-----
>  migration/options.c                 | 21 ++++++++
>  migration/options.h                 |  1 +
>  qapi/migration.json                 | 40 ++++++++++++++--
>  stubs/migr-blocker.c                | 10 ++++
>  tests/qtest/migration-test.c        | 27 +++++++++++
>  20 files changed, 255 insertions(+), 29 deletions(-)
> 


  parent reply	other threads:[~2023-10-26 20:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-26 20:08 [PATCH V2 0/6] Live Update reboot mode Steve Sistare
2023-10-26 20:08 ` [PATCH V2 1/6] migration: mode parameter Steve Sistare
2023-10-26 20:08 ` [PATCH V2 2/6] migration: per-mode blockers Steve Sistare
2023-10-26 20:08 ` [PATCH V2 3/6] cpr: relax blockdev migration blockers Steve Sistare
2023-10-26 20:08 ` [PATCH V2 4/6] cpr: relax vhost " Steve Sistare
2023-10-26 20:08 ` [PATCH V2 5/6] cpr: reboot mode Steve Sistare
2023-10-26 20:08 ` [PATCH V2 6/6] tests/qtest: migration: add reboot mode test Steve Sistare
2023-10-26 20:10 ` Steven Sistare [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-10-25 19:44 [PATCH V2 0/6] Live Update reboot mode Steve Sistare

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7331cea3-58b0-4be1-bed5-ebf4441096b5@oracle.com \
    --to=steven.sistare@oracle.com \
    --cc=berrange@redhat.com \
    --cc=farosas@suse.de \
    --cc=leobras@redhat.com \
    --cc=peterx@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).