vzdump: align behavior for vma backup with PBS backup for templates

For PBS, templates are started in 'prelaunch' mode for backup and the
same can be done for VMA for consistency.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
This commit is contained in:
Fiona Ebner 2025-01-24 14:33:23 +01:00 committed by Fabian Grünbichler
parent a52f3dd3b0
commit 3d32c4e588

View File

@ -687,7 +687,7 @@ sub archive_pbs {
push @$cmd, "qemu-server.conf:$conffile";
push @$cmd, "fw.conf:$firewall" if -e $firewall;
$self->loginfo("starting template backup");
$self->loginfo("starting diskless backup");
$self->loginfo(join(' ', @$cmd));
$self->cmd($cmd);
@ -852,19 +852,8 @@ sub archive_vma {
my $is_template = PVE::QemuConfig->is_template($self->{vmlist}->{$vmid});
my $diskcount = scalar(@{$task->{disks}});
if ($is_template || !$diskcount) {
my @pathlist;
foreach my $di (@{$task->{disks}}) {
if ($di->{type} eq 'block' || $di->{type} eq 'file') {
push @pathlist, "$di->{qmdevice}=$di->{path}";
} else {
die "implement me";
}
}
if (!$diskcount) {
$self->loginfo("backup contains no disks");
}
if (!$diskcount) {
$self->loginfo("backup contains no disks");
my $outcmd;
if ($comp) {
@ -877,9 +866,9 @@ sub archive_vma {
my $cmd = ['/usr/bin/vma', 'create', '-v', '-c', $conffile];
push @$cmd, '-c', $firewall if -e $firewall;
push @$cmd, $outcmd, @pathlist;
push @$cmd, $outcmd;
$self->loginfo("starting template backup");
$self->loginfo("starting diskless backup");
$self->loginfo(join(' ', @$cmd));
if ($opts->{stdout}) {