From: Fabian Ebner Date: Wed, 8 Apr 2020 09:25:02 +0000 (+0200) Subject: Use new storage_migrate interface X-Git-Url: https://git.proxmox.com/?p=pve-container.git;a=commitdiff_plain;h=1d26bb8672f73b51e5b76e570564a491f2585b3c Use new storage_migrate interface Signed-off-by: Fabian Ebner --- diff --git a/src/PVE/LXC/Migrate.pm b/src/PVE/LXC/Migrate.pm index 638ce1f..d0be6d4 100644 --- a/src/PVE/LXC/Migrate.pm +++ b/src/PVE/LXC/Migrate.pm @@ -278,17 +278,21 @@ sub phase1 { } my $opts = $self->{opts}; - my $insecure = $opts->{migration_type} eq 'insecure'; foreach my $volid (keys %$volhash) { next if $rep_volumes->{$volid}; my ($sid, $volname) = PVE::Storage::parse_volume_id($volid); push @{$self->{volumes}}, $volid; - my $with_snapshots = $volhash->{$volid}->{snapshots}; my $bwlimit = PVE::Storage::get_bandwidth_limit('migration', [$sid], $opts->{bwlimit}); # JSONSchema and get_bandwidth_limit use kbps - storage_migrate bps $bwlimit = $bwlimit * 1024 if defined($bwlimit); - PVE::Storage::storage_migrate($self->{storecfg}, $volid, $self->{ssh_info}, $sid, undef, undef, undef, $bwlimit, $insecure, $with_snapshots); + my $storage_migrate_opts = { + 'bwlimit' => $bwlimit, + 'insecure' => $opts->{migration_type} eq 'insecure', + 'with_snapshots' => $volhash->{$volid}->{snapshots}, + }; + + PVE::Storage::storage_migrate($self->{storecfg}, $volid, $self->{ssh_info}, $sid, $storage_migrate_opts); } my $conffile = PVE::LXC::Config->config_file($vmid);