From 3d32c4e5881943cd4117b61527c766a02c593dc5 Mon Sep 17 00:00:00 2001 From: Fiona Ebner Date: Fri, 24 Jan 2025 14:33:23 +0100 Subject: [PATCH] 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 --- PVE/VZDump/QemuServer.pm | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/PVE/VZDump/QemuServer.pm b/PVE/VZDump/QemuServer.pm index 9d7c26a3..3238e344 100644 --- a/PVE/VZDump/QemuServer.pm +++ b/PVE/VZDump/QemuServer.pm @@ -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}) {