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 1D4AB7073E for ; Mon, 7 Jun 2021 12:23:29 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 14168FDB1 for ; Mon, 7 Jun 2021 12:22:59 +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 ECC8CFDA5 for ; Mon, 7 Jun 2021 12:22:54 +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 B9D2A42B78 for ; Mon, 7 Jun 2021 12:22:54 +0200 (CEST) Date: Mon, 07 Jun 2021 12:22:43 +0200 From: Fabian =?iso-8859-1?q?Gr=FCnbichler?= To: Proxmox VE development discussion , Stefan Reiter References: <20210604094748.3383339-1-f.gruenbichler@proxmox.com> <20210604094748.3383339-7-f.gruenbichler@proxmox.com> In-Reply-To: MIME-Version: 1.0 User-Agent: astroid/0.15.0 (https://github.com/astroidmail/astroid) Message-Id: <1623061163.4mjzwxxy9c.astroid@nora.none> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-SPAM-LEVEL: Spam detection results: 0 AWL 0.965 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% 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 Subject: Re: [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: Mon, 07 Jun 2021 10:23:29 -0000 On June 7, 2021 11:29 am, Stefan Reiter wrote: > On 6/4/21 11:47 AM, Fabian Gr=C3=BCnbichler wrote: >> since using 'vma create ..' no longer works with immutable/read-only >> base volumes. >=20 > Why that? It shouldn't matter to vma if the base is read-only? Though I=20 > do see that in vma.c we don't tell QEMU that it should open the block=20 > backend read-only... I have not checked in-depth on the Qemu side what changed, but=20 alternatively we could fix the vma binary to mark as read-only like the=20 rest of the series and past patches did for the regular startup for=20 backup purposes. > Anyway, I do personally think that just starting a VM is also a good way=20 > of doing this, though as you say, for templates it would make a lot of=20 > sense to restrict the VM to use less resources. yeah, I am on the fence (hence the RFC) - on the one hand, it would be=20 more consistent with PBSp-backups to just start the VM, OTOH we'd save=20 on memory usage/.. if we fix vma. >=20 >>=20 >> first hunk drops a leftover variable from when we did the same change to >> the PBS code path. >>=20 >> Signed-off-by: Fabian Gr=C3=BCnbichler >> --- >> 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.. >>=20 >> PVE/VZDump/QemuServer.pm | 20 ++++---------------- >> 1 file changed, 4 insertions(+), 16 deletions(-) >>=20 >> 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"); >> =20 >> local $ENV{PBS_PASSWORD} =3D $password; >> @@ -621,19 +620,8 @@ sub archive_vma { >> } >> =20 >> my $diskcount =3D scalar(@{$task->{disks}}); >> - if (PVE::QemuConfig->is_template($self->{vmlist}->{$vmid}) || !$dis= kcount) { >> - my @pathlist; >> - foreach my $di (@{$task->{disks}}) { >> - if ($di->{type} eq 'block' || $di->{type} eq 'file') { >> - push @pathlist, "$di->{qmdevice}=3D$di->{path}"; >> - } else { >> - die "implement me"; >> - } >> - } >> - >> - if (!$diskcount) { >> - $self->loginfo("backup contains no disks"); >> - } >> + if (!$diskcount) { >> + $self->loginfo("backup doesn't contain any disks"); >=20 > nit: I'd leave the "backup contains no disks" message the same >=20 >> =20 >> my $outcmd; >> if ($comp) { >> @@ -646,9 +634,9 @@ sub archive_vma { >> =20 >> my $cmd =3D ['/usr/bin/vma', 'create', '-v', '-c', $conffile]; >> push @$cmd, '-c', $firewall if -e $firewall; >> - push @$cmd, $outcmd, @pathlist; >> + push @$cmd, $outcmd; >> =20 >> - $self->loginfo("starting template backup"); >> + $self->loginfo("starting backup"); >> $self->loginfo(join(' ', @$cmd)); >> =20 >> if ($opts->{stdout}) { >>=20 >=20