From: Jakob Klocker <j.klocker@proxmox.com>
To: pve-devel@lists.proxmox.com
Cc: Jakob Klocker <j.klocker@proxmox.com>
Subject: [PATCH container] fix: #7148: check CT protection before reassigning volume
Date: Mon, 1 Jun 2026 13:52:40 +0200 [thread overview]
Message-ID: <20260601115240.36497-1-j.klocker@proxmox.com> (raw)
When reassigning a volume, check the destination config before
removing the volume from the source config.
Link: https://bugzilla.proxmox.com/show_bug.cgi?id=7148
Signed-off-by: Jakob Klocker <j.klocker@proxmox.com>
---
src/PVE/API2/LXC.pm | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/PVE/API2/LXC.pm b/src/PVE/API2/LXC.pm
index 88067dd..af01de0 100644
--- a/src/PVE/API2/LXC.pm
+++ b/src/PVE/API2/LXC.pm
@@ -2791,6 +2791,8 @@ __PACKAGE__->register_method({
if !PVE::Storage::storage_can_replicate($storecfg, $storeid, $format);
}
+ PVE::LXC::Config->check_protection($target_conf, "can't move volume '$target_mpkey' to CT $target_vmid");
+
return ($source_conf, $target_conf, $drive);
};
--
2.47.3
next reply other threads:[~2026-06-01 11:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-01 11:52 Jakob Klocker [this message]
2026-06-05 14:26 ` [PATCH container] fix: #7148: check CT protection before reassigning volume Lukas Sichert
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=20260601115240.36497-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 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.