[pve-devel] applied: [PATCH storage] Actually use target_volid
Wolfgang Bumiller
w.bumiller at proxmox.com
Tue Sep 17 09:46:49 CEST 2019
applied
On Wed, Sep 11, 2019 at 11:46:19AM +0200, Fabian Ebner wrote:
> Migration with --targetstorage was broken because of this.
>
> Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
> ---
> PVE/Storage.pm | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/PVE/Storage.pm b/PVE/Storage.pm
> index 755eca8..31eeb21 100755
> --- a/PVE/Storage.pm
> +++ b/PVE/Storage.pm
> @@ -586,7 +586,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];
>
> @@ -598,7 +598,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
> }
> --
> 2.20.1
More information about the pve-devel
mailing list