all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: copystring <copystring@gmail.com>
To: pve-devel@lists.proxmox.com
Cc: copystring <copystring@gmail.com>
Subject: SPAM: [RFC PATCH pve-docs] pct: document OCI rootfs replacement semantics
Date: Mon,  6 Jul 2026 21:39:34 +0200	[thread overview]
Message-ID: <20260706193934.279992-7-copystring@gmail.com> (raw)
In-Reply-To: <20260706193934.279992-1-copystring@gmail.com>

Document that replacing an OCI-based container rootfs changes only rootfs, keeps separate mpX mount points, and leaves the previous rootfs as an unused volume for recovery. Also point out that data stored only on / is not carried over.

Signed-off-by: copystring <copystring@gmail.com>
---
 pct.adoc | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/pct.adoc b/pct.adoc
index cd3130f..aded5a9 100644
--- a/pct.adoc
+++ b/pct.adoc
@@ -368,6 +368,39 @@ view of a storage.
 Once the template is on a storage, you can create the container with
 `pct create` or use the wizard in the web interface.
 
+Replacing the Rootfs from an OCI Image
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+For an existing OCI-based container, `pct replace-rootfs-from-oci` can replace
+the container's `rootfs` with the contents of another OCI image archive. This is
+an offline operation and requires the container to be stopped.
+
+WARNING: This operation replaces the active `/` filesystem of the container.
+Data that is stored only on the old `rootfs` will not be part of the newly
+active `rootfs`. Separate mount points configured as `mp0`, `mp1`, and so on are
+kept unchanged.
+
+The previous `rootfs` is kept as an `unusedX` volume entry after a successful
+replacement. This allows manual recovery or rollback, but it also means that the
+old volume continues to use storage space until it is explicitly cleaned up.
+
+By default, OCI-derived runtime settings such as the entrypoint, environment,
+OS type and architecture are updated to match the new image. Use
+`--update-oci-config 0` to only switch the `rootfs` while preserving the existing
+runtime settings.
+
+Before replacing the `rootfs`, make sure that all persistent application data is
+stored on separate mount points or backed up. The operation does not try to
+detect application data directories such as `/data` or `/config`.
+
+For example, to replace the `rootfs` of container `999` with a new OCI image
+archive:
+
+----
+# pct replace-rootfs-from-oci 999 local:vztmpl/alpine-3.21.tar \
+    --confirm-rootfs-replace 1
+----
+
 [[pct_settings]]
 Container Settings
 ------------------
-- 
2.55.0.windows.2




  parent reply	other threads:[~2026-07-09  8:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-06 19:39 SPAM: [RFC PATCH 0/4] lxc: add safe OCI rootfs replacement copystring
2026-07-06 19:39 ` SPAM: [RFC PATCH 1/4] lxc: create: add isolated OCI rootfs preparation copystring
2026-07-06 19:39 ` SPAM: [RFC PATCH 2/4] api: lxc: add OCI rootfs replacement endpoint copystring
2026-07-06 19:39 ` SPAM: [RFC PATCH 3/4] pct: add OCI rootfs replacement command copystring
2026-07-06 19:39 ` SPAM: [RFC PATCH 4/4] test: cover OCI rootfs replacement API transaction copystring
2026-07-06 19:39 ` SPAM: [RFC PATCH pve-manager] lxc: add OCI rootfs replacement window copystring
2026-07-06 19:39 ` copystring [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-07-06 19:40 SPAM: [RFC PATCH 0/4] lxc: add safe OCI rootfs replacement copystring
2026-07-06 19:40 ` SPAM: [RFC PATCH pve-docs] pct: document OCI rootfs replacement semantics copystring

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=20260706193934.279992-7-copystring@gmail.com \
    --to=copystring@gmail.com \
    --cc=pve-devel@lists.proxmox.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal