mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-08-13 22:40:34 +00:00
adapt to new storage_migrate activation behavior
Offline migrated volumes are now activated within storage_migrate. Online migrated volumes can be assumed to be already active. Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
This commit is contained in:
parent
6cbd3eb82c
commit
78bd57d9c3
@ -269,7 +269,6 @@ sub prepare {
|
|||||||
|
|
||||||
my $vollist = PVE::QemuServer::get_vm_volumes($conf);
|
my $vollist = PVE::QemuServer::get_vm_volumes($conf);
|
||||||
|
|
||||||
my $need_activate = [];
|
|
||||||
foreach my $volid (@$vollist) {
|
foreach my $volid (@$vollist) {
|
||||||
my ($sid, $volname) = PVE::Storage::parse_volume_id($volid, 1);
|
my ($sid, $volname) = PVE::Storage::parse_volume_id($volid, 1);
|
||||||
|
|
||||||
@ -284,16 +283,9 @@ sub prepare {
|
|||||||
my $plugin = PVE::Storage::Plugin->lookup($scfg->{type});
|
my $plugin = PVE::Storage::Plugin->lookup($scfg->{type});
|
||||||
warn "Used shared storage '$sid' is not online on source node!\n"
|
warn "Used shared storage '$sid' is not online on source node!\n"
|
||||||
if !$plugin->check_connection($sid, $scfg);
|
if !$plugin->check_connection($sid, $scfg);
|
||||||
} else {
|
|
||||||
# only activate if not shared
|
|
||||||
next if ($volid =~ m/vm-\d+-cloudinit/);
|
|
||||||
push @$need_activate, $volid;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# activate volumes
|
|
||||||
PVE::Storage::activate_volumes($self->{storecfg}, $need_activate);
|
|
||||||
|
|
||||||
# test ssh connection
|
# test ssh connection
|
||||||
my $cmd = [ @{$self->{rem_ssh}}, '/bin/true' ];
|
my $cmd = [ @{$self->{rem_ssh}}, '/bin/true' ];
|
||||||
eval { $self->cmd_quiet($cmd); };
|
eval { $self->cmd_quiet($cmd); };
|
||||||
|
Loading…
Reference in New Issue
Block a user