I was able to reproduce the Problem, the Patch worked for me.

One thing I found, which is only indirectly related:
One can't move storage to a protected container, but one can move
storage from a protected container to an unprotected container, which to
my intuition seems wrong.
Is this expected behaviour?

Tested-by: Lukas Sichert <[email protected]>

On 2026-06-01 13:52, Jakob Klocker <[email protected]> wrote:

> 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 <[email protected]>
> ---
>  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




Reply via email to