- die "unable to migrate local mountpoint '$volid' while CT is running"
- if !$scfg->{shared} && $running;
+
+ if ($scfg->{shared}) {
+ # PVE::Storage::activate_storage checks this for non-shared storages
+ my $plugin = PVE::Storage::Plugin->lookup($scfg->{type});
+ warn "Used shared storage '$storage' is not online on source node!\n"
+ if !$plugin->check_connection($storage, $scfg);
+ } else {
+ # only activate if not shared
+ push @$need_activate, $volid;
+
+ die "unable to migrate local mountpoint '$volid' while CT is running"
+ if $running;
+ }