From ecd3047527a1838a7313c11a62275193a0922b50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20Peliz=C3=A4us?= Date: Wed, 18 Oct 2023 12:11:01 +0200 Subject: [PATCH] lxc/storage/volume: Move volume if a destination cluster member name is set MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julian Pelizäus --- lxc/storage_volume.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lxc/storage_volume.go b/lxc/storage_volume.go index a4115ddf82eb..fb4346e848e9 100644 --- a/lxc/storage_volume.go +++ b/lxc/storage_volume.go @@ -1661,8 +1661,9 @@ func (c *cmdStorageVolumeMove) Run(cmd *cobra.Command, args []string) error { return fmt.Errorf(i18n.G("No storage pool for target volume specified")) } - // Rename volume if both remotes and pools of source and target are equal. - if srcRemote == dstRemote && srcVolPool == dstVolPool { + // Rename volume if both remotes and pools of source and target are equal + // and no destination cluster member name is set. + if srcRemote == dstRemote && srcVolPool == dstVolPool && c.storageVolume.flagDestinationTarget == "" { var args []string if srcRemote != "" {