diff --git a/PVE/VZDump/QemuServer.pm b/PVE/VZDump/QemuServer.pm index 0004cc28..fd36c696 100644 --- a/PVE/VZDump/QemuServer.pm +++ b/PVE/VZDump/QemuServer.pm @@ -233,7 +233,9 @@ sub archive { $speed = $opts->{bwlimit}*1024; } - if (PVE::QemuServer::is_template($self->{vmlist}->{$vmid})) { + my $diskcount = scalar(@{$task->{disks}}); + + if (PVE::QemuServer::is_template($self->{vmlist}->{$vmid}) || !$diskcount) { my @pathlist; foreach my $di (@{$task->{disks}}) { if ($di->{type} eq 'block' || $di->{type} eq 'file') { @@ -243,6 +245,10 @@ sub archive { } } + if (!$diskcount) { + $self->loginfo("backup contains no disks"); + } + my $outcmd; if ($comp) { $outcmd = "exec:$comp";