[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 24/40] cpr: reboot mode
From: |
Juan Quintela |
Subject: |
[PULL 24/40] cpr: reboot mode |
Date: |
Thu, 2 Nov 2023 12:40:38 +0100 |
From: Steve Sistare <steven.sistare@oracle.com>
Add the cpr-reboot migration mode. Usage:
$ qemu-system-$arch -monitor stdio ...
QEMU 8.1.50 monitor - type 'help' for more information
(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
$ qemu-system-$arch -monitor stdio -incoming defer ...
QEMU 8.1.50 monitor - type 'help' for more information
(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
In this mode, the migrate command saves state to a file, allowing one
to quit qemu, reboot to an updated kernel, and restart an updated version
of qemu. The caller must specify a migration URI that writes to and reads
from a file. Unlike normal mode, the use of certain local storage options
does not block the migration, but the caller must not modify guest block
devices between the quit and restart. To avoid saving guest RAM to the
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, such
as by backing it with a dax device, but this is not enforced. The restarted
qemu arguments must match those used to initially start qemu, plus the
-incoming option.
Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-ID: <1698263069-406971-6-git-send-email-steven.sistare@oracle.com>
---
qapi/migration.json | 15 ++++++++++++++-
hw/core/qdev-properties-system.c | 2 +-
2 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/qapi/migration.json b/qapi/migration.json
index 47c02a9346..3daeffc95d 100644
--- a/qapi/migration.json
+++ b/qapi/migration.json
@@ -636,9 +636,22 @@
#
# @normal: the original form of migration. (since 8.2)
#
+# @cpr-reboot: The migrate command saves state to a file, allowing one to
+# quit qemu, reboot to an updated kernel, and restart an updated
+# version of qemu. The caller must specify a migration URI
+# that writes to and reads from a file. Unlike normal mode,
+# the use of certain local storage options does not block the
+# migration, but the caller must not modify guest block devices
+# between the quit and restart. To avoid saving guest RAM to the
+# 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, such as by backing it with a dax device, but this
+# is not enforced. The restarted qemu arguments must match those
+# used to initially start qemu, plus the -incoming option.
+# (since 8.2)
##
{ 'enum': 'MigMode',
- 'data': [ 'normal' ] }
+ 'data': [ 'normal', 'cpr-reboot' ] }
##
# @BitmapMigrationBitmapAliasTransform:
diff --git a/hw/core/qdev-properties-system.c b/hw/core/qdev-properties-system.c
index b9179e8917..2f1dbb3fd7 100644
--- a/hw/core/qdev-properties-system.c
+++ b/hw/core/qdev-properties-system.c
@@ -680,7 +680,7 @@ QEMU_BUILD_BUG_ON(sizeof(MigMode) != sizeof(int));
const PropertyInfo qdev_prop_mig_mode = {
.name = "MigMode",
.description = "mig_mode values, "
- "normal",
+ "normal,cpr-reboot",
.enum_table = &MigMode_lookup,
.get = qdev_propinfo_get_enum,
.set = qdev_propinfo_set_enum,
--
2.41.0
- [PULL 19/40] migration: Add tracepoints for downtime checkpoints, (continued)
- [PULL 18/40] migration: migration_stop_vm() helper, Juan Quintela, 2023/11/02
- [PULL 22/40] cpr: relax blockdev migration blockers, Juan Quintela, 2023/11/02
- [PULL 23/40] cpr: relax vhost migration blockers, Juan Quintela, 2023/11/02
- [PULL 24/40] cpr: reboot mode,
Juan Quintela <=
- [PULL 25/40] tests/qtest: migration: add reboot mode test, Juan Quintela, 2023/11/02
- [PULL 26/40] migration: Refactor error handling in source return path, Juan Quintela, 2023/11/02
- [PULL 27/40] migration: Allow network to fail even during recovery, Juan Quintela, 2023/11/02
- [PULL 28/40] tests/migration-test: Add a test for postcopy hangs during RECOVER, Juan Quintela, 2023/11/02
- [PULL 29/40] migration: Change ram_dirty_bitmap_reload() retval to bool, Juan Quintela, 2023/11/02
- [PULL 31/40] migration: convert migration 'uri' into 'MigrateAddress', Juan Quintela, 2023/11/02
- [PULL 30/40] migration: New QAPI type 'MigrateAddress', Juan Quintela, 2023/11/02
- [PULL 32/40] migration: convert socket backend to accept MigrateAddress, Juan Quintela, 2023/11/02
- [PULL 33/40] migration: convert rdma backend to accept MigrateAddress, Juan Quintela, 2023/11/02
- [PULL 35/40] migration: Convert the file backend to the new QAPI syntax, Juan Quintela, 2023/11/02