From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: "Proxmox VE development discussion" <pve-devel@lists.proxmox.com>,
"Fabian Grünbichler" <f.gruenbichler@proxmox.com>
Subject: Re: [pve-devel] [PATCH qemu-server] vzdump: add master key support
Date: Fri, 28 May 2021 13:50:55 +0200 [thread overview]
Message-ID: <bfab29e1-2092-90d3-b977-4ad353f0be64@proxmox.com> (raw)
In-Reply-To: <20210208130835.2512356-5-f.gruenbichler@proxmox.com>
On 08.02.21 14:08, Fabian Grünbichler wrote:
> running outdated VMs without master key support will generate a warning
> but proceed with a backup without encrypted key upload.
>
> Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
> ---
>
> Notes:
> requires libpve-storage-perl with master key support.
>
needs a rebase
> PVE/VZDump/QemuServer.pm | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
>
> diff --git a/PVE/VZDump/QemuServer.pm b/PVE/VZDump/QemuServer.pm
> index b5e74d3..e3f785a 100644
> --- a/PVE/VZDump/QemuServer.pm
> +++ b/PVE/VZDump/QemuServer.pm
> @@ -485,6 +485,7 @@ sub archive_pbs {
> my $repo = PVE::PBSClient::get_repository($scfg);
> my $password = PVE::Storage::PBSPlugin::pbs_get_password($scfg, $opts->{storage});
> my $keyfile = PVE::Storage::PBSPlugin::pbs_encryption_key_file_name($scfg, $opts->{storage});
> + my $master_keyfile = PVE::Storage::PBSPlugin::pbs_master_pubkey_file_name($scfg, $opts->{storage});
>
> my $diskcount = scalar(@{$task->{disks}});
> # proxmox-backup-client can only handle raw files and block devs
> @@ -533,6 +534,12 @@ sub archive_pbs {
> . "sure you've installed the latest version and the VM has been restarted.\n";
> }
>
> + if (!defined($qemu_support->{"pbs-masterkey"}) && -e $master_keyfile) {
> + $self->loginfo("WARNING: backup target is configured with master key, but running QEMU version does not support master keys.");
> + $self->loginfo("Please make sure you've installed the latest version and the VM has been restarted to use master key feature.");
> + $master_keyfile = undef; # skip rest of master key handling below
> + }
> +
> my $fs_frozen = $self->qga_fs_freeze($task, $vmid);
>
> my $params = {
> @@ -551,7 +558,13 @@ sub archive_pbs {
> $self->loginfo("enabling encryption");
> $params->{keyfile} = $keyfile;
> $params->{encrypt} = JSON::true;
> + if (defined($master_keyfile) && -e $master_keyfile) {
> + $self->loginfo("enabling master key feature");
> + $params->{"master-keyfile"} = $master_keyfile;
> + }
> } else {
> + $self->loginfo("WARNING: backup target is configured with master key, but this backup is not encrypted - master key settings will be ignored!")
> + if defined($master_keyfile) && -e $master_keyfile;
> $params->{encrypt} = JSON::false;
> }
>
>
next prev parent reply other threads:[~2021-05-28 11:51 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-08 13:08 [pve-devel] [PATCH-SERIES 0/4] PBS master key integration Fabian Grünbichler
2021-02-08 13:08 ` [pve-devel] [PATCH proxmox-backup-qemu] api: add master key support Fabian Grünbichler
2021-02-12 14:38 ` [pve-devel] applied: " Thomas Lamprecht
2021-02-08 13:08 ` [pve-devel] [PATCH qemu] pbs: " Fabian Grünbichler
2021-02-10 11:05 ` Stefan Reiter
2021-02-10 12:52 ` Fabian Grünbichler
2021-02-08 13:08 ` [pve-devel] [PATCH v2 storage] pbs: allow setting up a master key Fabian Grünbichler
2021-04-22 20:00 ` [pve-devel] applied: " Thomas Lamprecht
2021-02-08 13:08 ` [pve-devel] [PATCH qemu-server] vzdump: add master key support Fabian Grünbichler
2021-05-28 11:50 ` Thomas Lamprecht [this message]
2021-05-28 12:09 ` [pve-devel] [PATCH REBASE " Fabian Grünbichler
2021-06-02 14:51 ` [pve-devel] applied: " Thomas Lamprecht
2021-05-12 9:54 ` [pve-devel] [PATCH-SERIES 0/4] PBS master key integration Fabian Ebner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bfab29e1-2092-90d3-b977-4ad353f0be64@proxmox.com \
--to=t.lamprecht@proxmox.com \
--cc=f.gruenbichler@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.