mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-06-15 21:47:05 +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;
|
$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;
|
my @pathlist;
|
||||||
foreach my $di (@{$task->{disks}}) {
|
foreach my $di (@{$task->{disks}}) {
|
||||||
if ($di->{type} eq 'block' || $di->{type} eq 'file') {
|
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;
|
my $outcmd;
|
||||||
if ($comp) {
|
if ($comp) {
|
||||||
$outcmd = "exec:$comp";
|
$outcmd = "exec:$comp";
|
||||||
|
Loading…
Reference in New Issue
Block a user