Hello all,
I've been testing the OCI image support in PVE 9.2. I am running a 3-node HA cluster testing OCI image support.
Current upgrade path for OCI images is to re-create the container with the new image.
Expected behavior:
* Delete container, leave "Destroy unreferenced disks owned by guest" unchecked
* Recreate container
* Manually update LXC config with mountpoint for existing data disk before starting (this essentially is a small disk containing configuration settings).
* Start container with new version.
Observed behavior:
* Container and ALL mounted disks are removed.
* Retry with test container, removing the mounted disk from the LXC config before repeating steps. Data disk is still removed.
For OCI containers to really work, this config disk is critical for easy version upgrades.
I am not sure if this is working as intended, or this is a bug. I would expect that the config disk is kept (especially after being removed from the LXC config, and not explicitly deleting the referenced disks. Note: When deleting you must check at least one option so I have checked Purge from job configurations).
Has anyone been able to replace a OCI container with a new version without PVE destroying the config disk?
edit: I would note that the current workaround is copy the config disk before removing the container, and manually restore it before starting the new container, however this smells like I'm doing something wrong.
I've been testing the OCI image support in PVE 9.2. I am running a 3-node HA cluster testing OCI image support.
Current upgrade path for OCI images is to re-create the container with the new image.
Expected behavior:
* Delete container, leave "Destroy unreferenced disks owned by guest" unchecked
* Recreate container
* Manually update LXC config with mountpoint for existing data disk before starting (this essentially is a small disk containing configuration settings).
* Start container with new version.
Observed behavior:
* Container and ALL mounted disks are removed.
* Retry with test container, removing the mounted disk from the LXC config before repeating steps. Data disk is still removed.
For OCI containers to really work, this config disk is critical for easy version upgrades.
I am not sure if this is working as intended, or this is a bug. I would expect that the config disk is kept (especially after being removed from the LXC config, and not explicitly deleting the referenced disks. Note: When deleting you must check at least one option so I have checked Purge from job configurations).
Has anyone been able to replace a OCI container with a new version without PVE destroying the config disk?
edit: I would note that the current workaround is copy the config disk before removing the container, and manually restore it before starting the new container, however this smells like I'm doing something wrong.
Code:
cp /d/pve/images/104/vm-104-disk-1.raw /tmp/
# remove and re-add new OCI container image, do not start
cp /tmp/vm-104-disk-1.raw /d/pve/images/104
# Add mountpoint manually to LXC image
vim /etv/pve/lxc/104.conf
# Start container as normal, config disk is kept and runs as expected.
Last edited: