mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-12 11:31:41 +00:00
replication: refuse to create jobs with nothing to do
When a VM has no disks or all of them are on shared storage the replication job has nothing to do and fails, so catch this when creating a new job.
This commit is contained in:
parent
5b35845009
commit
1adc6f7ab3
@ -126,7 +126,8 @@ __PACKAGE__->register_method ({
|
|||||||
|
|
||||||
my $guest_class = $PVE::API2::Replication::lookup_guest_class->($guest_info->{type});
|
my $guest_class = $PVE::API2::Replication::lookup_guest_class->($guest_info->{type});
|
||||||
my $guest_conf = $guest_class->load_config($guest);
|
my $guest_conf = $guest_class->load_config($guest);
|
||||||
$guest_class->get_replicatable_volumes(PVE::Storage::config(), $guest, $guest_conf, 0, 0);
|
my $rep_volumes = $guest_class->get_replicatable_volumes(PVE::Storage::config(), $guest, $guest_conf, 0, 0);
|
||||||
|
die "No replicatable volumes found\n" if !%$rep_volumes;
|
||||||
|
|
||||||
my $code = sub {
|
my $code = sub {
|
||||||
my $cfg = PVE::ReplicationConfig->new();
|
my $cfg = PVE::ReplicationConfig->new();
|
||||||
|
Loading…
Reference in New Issue
Block a user