[pve-devel] [PATCH v2 guest-common 19/28] Use new storage_migrate interface

Fabian Ebner f.ebner at proxmox.com
Mon Feb 24 13:44:09 CET 2020


Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
---
 PVE/Replication.pm | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/PVE/Replication.pm b/PVE/Replication.pm
index ae1ade4..5b1e917 100644
--- a/PVE/Replication.pm
+++ b/PVE/Replication.pm
@@ -186,8 +186,16 @@ sub replicate_volume {
     my ($storeid, $volname) = PVE::Storage::parse_volume_id($volid);
 
     my $ratelimit_bps = int(1000000*$rate) if $rate;
-    PVE::Storage::storage_migrate($storecfg, $volid, $ssh_info, $storeid, $volname,
-				  $base_snapshot, $sync_snapname, $ratelimit_bps, $insecure, 1, $logfunc);
+    my $opts = {
+	'target_volname' => $volname,
+	'base_snapshot' => $base_snapshot,
+	'snapshot' => $sync_snapname,
+	'ratelimit_bps' => $ratelimit_bps,
+	'insecure' => $insecure,
+	'with_snapshots' => 1,
+    };
+
+    PVE::Storage::storage_migrate($storecfg, $volid, $ssh_info, $storeid, $opts, $logfunc);
 }
 
 
-- 
2.20.1




More information about the pve-devel mailing list