---
Note: this is modelled after PVE::LXC::Migrate

 PVE/QemuMigrate.pm | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm
index 6c734ca..41fc660 100644
--- a/PVE/QemuMigrate.pm
+++ b/PVE/QemuMigrate.pm
@@ -158,7 +158,13 @@ sub prepare {
     my $vollist = PVE::QemuServer::get_vm_volumes($conf);
     PVE::Storage::activate_volumes($self->{storecfg}, $vollist);
 
-    # fixme: check if storage is available on both nodes
+    foreach my $volid (@$vollist) {
+       my ($sid, $volname) = PVE::Storage::parse_volume_id($volid, 1);
+
+       # check if storage is available on both nodes
+       my $scfg = PVE::Storage::storage_check_node($self->{storecfg}, $sid);
+       PVE::Storage::storage_check_node($self->{storecfg}, $sid, 
$self->{node});
+    }
 
     # test ssh connection
     my $cmd = [ @{$self->{rem_ssh}}, '/bin/true' ];
-- 
2.1.4


_______________________________________________
pve-devel mailing list
[email protected]
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to