Document a CPR setup where guest RAM is shared/external and preserved in
place.

With shared RAM and x-ignore-shared enabled, the migration stream skips
guest RAM pages and transfers only non-RAM VM state (vmstate).

Note that a memfd-backed RAM file is not persistent across a reboot by
itself. For a host kexec reboot, use persistent shared memory (for
example a DAX device), or use an external manager (for example Linux Live
Update Orchestrator (LUO)) to preserve the RAM backing file and re-attach
it to the new QEMU instance.

Signed-off-by: Li Chen <[email protected]>
---
 docs/devel/migration/CPR.rst | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/docs/devel/migration/CPR.rst b/docs/devel/migration/CPR.rst
index b6178568a8..e60ae31b45 100644
--- a/docs/devel/migration/CPR.rst
+++ b/docs/devel/migration/CPR.rst
@@ -46,9 +46,20 @@ Usage
 
 It is recommended that guest RAM be backed with some type of shared
 memory, such as ``memory-backend-file,share=on``, and that the
-``x-ignore-shared`` capability be set.  This combination allows memory
-to be saved in place.  Otherwise, after QEMU stops the VM, all guest
-RAM is copied to the migration URI.
+``x-ignore-shared`` capability be set.  With shared RAM and
+``x-ignore-shared``, the migration stream skips guest RAM pages and
+transfers only non-RAM VM state (vmstate), while guest RAM is preserved
+in place.  Otherwise, after QEMU stops the VM, all guest RAM is copied
+to the migration URI.
+
+Note that a memfd-backed RAM file is not persistent across a reboot by
+itself.  If you want to reboot to a new host kernel while keeping RAM in
+place, use persistent shared memory (for example a DAX device), or use
+an external manager (for example Linux Live Update Orchestrator (LUO))
+that preserves the RAM backing file and re-attaches it to the new QEMU
+instance (for example with ``-add-fd`` and a ``memory-backend-file``
+pointing at ``/dev/fdset/<id>``).  QEMU does not manage that
+orchestration.
 
 Outgoing:
   * Set the migration mode parameter to ``cpr-reboot``.
-- 
2.52.0


Reply via email to