mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-08-07 13:20:08 +00:00
bwlimit: add parameter to QemuMigrate::sync_disks
used for offline migration of local volumes Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
This commit is contained in:
parent
9fa05d31de
commit
15a37695b6
@ -464,10 +464,16 @@ sub sync_disks {
|
|||||||
} else {
|
} else {
|
||||||
next if $rep_volumes->{$volid};
|
next if $rep_volumes->{$volid};
|
||||||
push @{$self->{volumes}}, $volid;
|
push @{$self->{volumes}}, $volid;
|
||||||
my $insecure = $self->{opts}->{migration_type} eq 'insecure';
|
my $opts = $self->{opts};
|
||||||
|
my $insecure = $opts->{migration_type} eq 'insecure';
|
||||||
my $with_snapshots = $local_volumes->{$volid}->{snapshots};
|
my $with_snapshots = $local_volumes->{$volid}->{snapshots};
|
||||||
|
# use 'migrate' limit for transfer to other node
|
||||||
|
my $bwlimit = PVE::Storage::get_bandwidth_limit('migrate', [$targetsid, $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}, $targetsid,
|
PVE::Storage::storage_migrate($self->{storecfg}, $volid, $self->{ssh_info}, $targetsid,
|
||||||
undef, undef, undef, undef, $insecure, $with_snapshots);
|
undef, undef, undef, $bwlimit, $insecure, $with_snapshots);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user