mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-06-14 13:26:24 +00:00
fix bug #502: allow creation of empty vma archives
This commit is contained in:
parent
c0efd8cd0e
commit
c82935e92e
@ -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";
|
||||
|
Loading…
Reference in New Issue
Block a user