From cfdffd8a20a1bc21b2059c1be59188340ecba603 Mon Sep 17 00:00:00 2001 From: Fabian Ebner Date: Wed, 11 Sep 2019 11:46:19 +0200 Subject: [PATCH] Actually use target_volid Migration with --targetstorage was broken because of this. Signed-off-by: Fabian Ebner Signed-off-by: Wolfgang Bumiller --- PVE/Storage.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PVE/Storage.pm b/PVE/Storage.pm index ff0d944..298976f 100755 --- a/PVE/Storage.pm +++ b/PVE/Storage.pm @@ -588,7 +588,7 @@ sub storage_migrate { } } - my @formats = volume_transfer_formats($cfg, $volid, $volid, $snapshot, $base_snapshot, $with_snapshots); + my @formats = volume_transfer_formats($cfg, $volid, $target_volid, $snapshot, $base_snapshot, $with_snapshots); die "cannot migrate from storage type '$scfg->{type}' to '$tcfg->{type}'\n" if !@formats; my $format = $formats[0]; @@ -600,7 +600,7 @@ sub storage_migrate { $with_snapshots = $with_snapshots ? 1 : 0; # sanitize for passing as cli parameter my $send = ['pvesm', 'export', $volid, $format, '-', '-with-snapshots', $with_snapshots]; - my $recv = [@$ssh, '--', 'pvesm', 'import', $volid, $format, $import_fn, '-with-snapshots', $with_snapshots]; + my $recv = [@$ssh, '--', 'pvesm', 'import', $target_volid, $format, $import_fn, '-with-snapshots', $with_snapshots]; if (defined($snapshot)) { push @$send, '-snapshot', $snapshot }