From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id D86921FF16B for ; Tue, 1 Jul 2025 17:44:46 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 03930A66B; Tue, 1 Jul 2025 17:42:12 +0200 (CEST) From: Fiona Ebner To: pve-devel@lists.proxmox.com Date: Tue, 1 Jul 2025 17:41:03 +0200 Message-ID: <20250701154117.434512-44-f.ebner@proxmox.com> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250701154117.434512-1-f.ebner@proxmox.com> References: <20250701154117.434512-1-f.ebner@proxmox.com> MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.029 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy 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: [pve-devel] [PATCH qemu-server v2 43/49] live import: also record volid information 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: , Reply-To: Proxmox VE development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" Will be required for generating the blockdev starting with machine version 10.0. Signed-off-by: Fiona Ebner --- src/PVE/API2/Qemu.pm | 2 ++ src/PVE/QemuServer.pm | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/PVE/API2/Qemu.pm b/src/PVE/API2/Qemu.pm index 1aa3b358..2e6358e4 100644 --- a/src/PVE/API2/Qemu.pm +++ b/src/PVE/API2/Qemu.pm @@ -530,6 +530,7 @@ my sub create_disks : prototype($$$$$$$$$$$) { $live_import_mapping->{$ds} = { path => $path, format => $source_format, + volid => $source, }; $live_import_mapping->{$ds}->{'delete-after-finish'} = $source if $needs_extraction; @@ -574,6 +575,7 @@ my sub create_disks : prototype($$$$$$$$$$$) { $live_import_mapping->{$ds} = { path => $source, format => $source_format, + volid => $source, }; } else { (undef, $dst_volid) = PVE::QemuServer::ImportDisk::do_import( diff --git a/src/PVE/QemuServer.pm b/src/PVE/QemuServer.pm index 4529e270..05c19390 100644 --- a/src/PVE/QemuServer.pm +++ b/src/PVE/QemuServer.pm @@ -7095,8 +7095,9 @@ sub live_import_from_files { if !exists($conf->{$dev}); my $info = $mapping->{$dev}; - my ($format, $path) = $info->@{qw(format path)}; + my ($format, $path, $volid) = $info->@{qw(format path volid)}; die "missing path for '$dev' mapping\n" if !$path; + die "missing volid for '$dev' mapping\n" if !$volid; die "missing format for '$dev' mapping\n" if !$format; die "invalid format '$format' for '$dev' mapping\n" if !grep { $format eq $_ } qw(raw qcow2 vmdk); -- 2.47.2 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel