From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 9571C74EEE for ; Fri, 4 Jun 2021 11:48:51 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 8B5AA1B34D for ; Fri, 4 Jun 2021 11:48:21 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 72C941B342 for ; Fri, 4 Jun 2021 11:48:17 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 4CFAA465D2 for ; Fri, 4 Jun 2021 11:48:17 +0200 (CEST) From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= To: pve-devel@lists.proxmox.com Date: Fri, 4 Jun 2021 11:47:48 +0200 Message-Id: <20210604094748.3383339-7-f.gruenbichler@proxmox.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210604094748.3383339-1-f.gruenbichler@proxmox.com> References: <20210604094748.3383339-1-f.gruenbichler@proxmox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.015 Adjusted score from AWL reputation of From: address KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [qemuserver.pm] Subject: [pve-devel] [RFC qemu-server 6/6] template: start VM for VMA backup X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jun 2021 09:48:51 -0000 since using 'vma create ..' no longer works with immutable/read-only base volumes. first hunk drops a leftover variable from when we did the same change to the PBS code path. Signed-off-by: Fabian Grünbichler --- this mimics what we already did for PBS, we still might want to think about limiting memory for the started VM for template backups which can't be resumed into operation anyway.. PVE/VZDump/QemuServer.pm | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/PVE/VZDump/QemuServer.pm b/PVE/VZDump/QemuServer.pm index 44b705f..9ac77c1 100644 --- a/PVE/VZDump/QemuServer.pm +++ b/PVE/VZDump/QemuServer.pm @@ -446,7 +446,6 @@ sub archive_pbs { # proxmox-backup-client can only handle raw files and block devs # only use it (directly) for disk-less VMs if (!$diskcount) { - my @pathlist; $self->loginfo("backup contains no disks"); local $ENV{PBS_PASSWORD} = $password; @@ -621,19 +620,8 @@ sub archive_vma { } my $diskcount = scalar(@{$task->{disks}}); - if (PVE::QemuConfig->is_template($self->{vmlist}->{$vmid}) || !$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 doesn't contain any disks"); my $outcmd; if ($comp) { @@ -646,9 +634,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 backup"); $self->loginfo(join(' ', @$cmd)); if ($opts->{stdout}) { -- 2.30.2