From: Jakob Klocker <j.klocker@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH container/qemu-server 0/2] qemu: lxc: refuse moving disks/volumes of protected VMs/CTs
Date: Mon, 21 Sep 2026 17:35:43 +0200 [thread overview]
Message-ID: <20260921153545.406664-1-j.klocker@proxmox.com> (raw)
According to the documentation, the protection flag on a container
prevents disk remove and update operations. This is currently not
enforced for the move operation, as reported on the mailing list [0]:
a volume can be moved off a protected CT even though the move removes
it from the source.
VMs are similar, with one difference: the protection flag blocks
removing a disk but still allows adding one. Moving a disk still
removes it from the source, so moving a disk away from a protected VM
should be refused too, but currently is not.
This series adds the missing move checks for both VMs and CTs so the
behavior matches the documentation. For CTs both directions are
checked, since protection also blocks updates; for VMs only the source.
Not addressed here, but raised by Fiona: we may also want to restrict
adding disks to a protected VM, so that protected VMs and CTs behave
identically for disk operations. This would be a change for a major
release though.
[0] https://lore.proxmox.com/all/cf28354b-0ba9-4c59-8f30-2abcb8c23fac@proxmox.com/T/#u
pve-container:
Jakob Klocker (1):
api: refuse moving volumes if container is protected
src/PVE/API2/LXC.pm | 14 ++++++++++++++
1 file changed, 14 insertions(+)
qemu-server:
Jakob Klocker (1):
api: refuse moving disks if source VM is protected
src/PVE/API2/Qemu.pm | 5 +++++
1 file changed, 5 insertions(+)
Summary over all repositories:
2 files changed, 19 insertions(+), 0 deletions(-)
--
Generated by murpp 0.12.0
next reply other threads:[~2026-09-21 15:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-21 15:35 Jakob Klocker [this message]
2026-09-21 15:35 ` [PATCH pve-container 1/2] api: refuse moving volumes if container is protected Jakob Klocker
2026-09-21 15:35 ` [PATCH qemu-server 2/2] api: refuse moving disks if source VM " Jakob Klocker
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=20260921153545.406664-1-j.klocker@proxmox.com \
--to=j.klocker@proxmox.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox