From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id EA0501FF183 for ; Wed, 30 Jul 2025 11:31:48 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id CF15337EBE; Wed, 30 Jul 2025 11:33:14 +0200 (CEST) Message-ID: <32c15934-5014-42bb-854b-f330d4c1250e@proxmox.com> Date: Wed, 30 Jul 2025 11:33:09 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Fiona Ebner To: pve-devel@lists.proxmox.com, Wolfgang Bumiller References: <20250729111557.136012-34-w.bumiller@proxmox.com> <20250730091816.35926-1-f.ebner@proxmox.com> Content-Language: en-US In-Reply-To: <20250730091816.35926-1-f.ebner@proxmox.com> X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1753867978564 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.026 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: Re: [pve-devel] [PATCH qemu-server 04/10] expect 'vm-vol' vtype wherever 'images' was expected 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" Am 30.07.25 um 11:18 AM schrieb Fiona Ebner: > Am 29.07.25 um 1:25 PM schrieb Wolfgang Bumiller: >> Signed-off-by: Wolfgang Bumiller >> --- >> src/PVE/API2/Qemu.pm | 16 +++++++++------- >> src/PVE/QemuMigrate.pm | 3 ++- >> src/PVE/QemuServer.pm | 6 ++++-- >> 3 files changed, 15 insertions(+), 10 deletions(-) > > The verify_media_type() helper in QemuServer.pm needs updating too, > e.g: > > diff --git a/src/PVE/QemuServer.pm b/src/PVE/QemuServer.pm > index 05a3be91..15b38caf 100644 > --- a/src/PVE/QemuServer.pm > +++ b/src/PVE/QemuServer.pm > @@ -1090,18 +1090,18 @@ sub verify_media_type { > > return if !$media; > > - my $etype; > if ($media eq 'disk') { > - $etype = 'images'; > + return if $vtype eq 'images' || $vtype eq 'vm-vol'; > + raise_param_exc({ > + $opt => > + "wrong volume type '$vtype' for media=$media - expected 'images' or 'vm-vol'", > + }); > } elsif ($media eq 'cdrom') { > - $etype = 'iso'; > - } else { > - die "internal error"; > + return if $vtype eq 'iso'; > + raise_param_exc({ $opt => "wrong volume type '$vtype' for media=$media - expected 'iso'" }); > } > > - return if ($vtype eq $etype); > - > - raise_param_exc({ $opt => "unexpected media type ($vtype != $etype)" }); > + die "internal error - unexpected media type '$media'\n"; > } > > sub cleanup_drive_path { Other places that still need to be adapted: QemuServer.pm: $parse_backup_hints complete_storage() complete_migration_storage() CLI/qm.pm: remote_migrate_vm API endpoint importdisk API endpoint API2/Qemu.pm: $check_storage_access - NEW_DISK_RE branch $check_storage_access - branch checking $extraction_scfg $check_storage_access_migrate update_vm_async API endpoint - documentation for 'import-working-storage' should also mention 'vm-vol' clone_vm API endpoint move_vm_disk API endpoint _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel