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 9DC8F1FF164 for ; Fri, 17 Jan 2025 10:27:52 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 72FE0983D; Fri, 17 Jan 2025 10:27:48 +0100 (CET) Message-ID: <28c27c6e-eb4a-4ff7-b3f6-ae4f0942fba5@proxmox.com> Date: Fri, 17 Jan 2025 10:27:12 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: Thomas Lamprecht , Proxmox VE development discussion References: <20250116115054.124447-1-f.ebner@proxmox.com> <20250116115054.124447-13-f.ebner@proxmox.com> <53eacde8-f967-4b92-86f0-ffaab194c63a@proxmox.com> Content-Language: en-US From: Fiona Ebner In-Reply-To: <53eacde8-f967-4b92-86f0-ffaab194c63a@proxmox.com> X-SPAM-LEVEL: Spam detection results: 0 AWL -0.050 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 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. 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 v2 12/18] machine: get vm machine: fallback to creation QEMU version for windows starting with 9.1 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 17.01.25 um 10:19 schrieb Thomas Lamprecht: > nit, if there will be a v3 I'd adapt the subject to: > > machine: fallback to creation QEMU version for windows starting with 9.1 > > The additional tag did not provide much useful additional info IMO and > made the subject rather long. > Ack > Am 16.01.25 um 12:50 schrieb Fiona Ebner: >> Starting from QEMU 9.1, pin to the creation version instead. Support >> for machine version 5.1 is expected to drop with QEMU 11.1 and it >> would still be good to handle Windows VMs that do not have explicit >> machine version for whatever reason. For example, explicitly setting >> the machine without a version on the CLI/API after creation is one way >> to end up with such a machine. > > But wouldn't the machine version jump from 5.1 to creation-QEMU with your > change for any VM that was created via CLI/API without explicit machine > version but with the code that adds the creation QEMU meta-info already > deployed? No, the version will still be 5.1, except if the creation-QEMU version is >= 9.1. >> + my $base_version = '5.1'; >> + # TODO PVE 10 - die early if there is a Windows VM both without explicit machine version >> + # and without meta info. >> + if (my $meta = PVE::QemuServer::MetaInfo::parse_meta_info($conf->{meta})) { >> + $base_version = $meta->{'creation-qemu'} >> + if PVE::QemuServer::Helpers::min_version($meta->{'creation-qemu'}, 9, 1); >> + ($base_version) = ($base_version =~ m/^(\d+.\d+)/); # need only major.minor >> + } >> + $machine = windows_get_pinned_machine_version($machine, $base_version, $kvmversion); The conditional might be better written up-front, not as a post-if and also cover the regex matching expression. _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel