public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Fiona Ebner <f.ebner@proxmox.com>
To: Thomas Lamprecht <t.lamprecht@proxmox.com>,
	Proxmox VE development discussion <pve-devel@lists.proxmox.com>
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
Date: Fri, 17 Jan 2025 10:27:12 +0100	[thread overview]
Message-ID: <28c27c6e-eb4a-4ff7-b3f6-ae4f0942fba5@proxmox.com> (raw)
In-Reply-To: <53eacde8-f967-4b92-86f0-ffaab194c63a@proxmox.com>

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


  reply	other threads:[~2025-01-17  9:27 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-16 11:50 [pve-devel] [PATCH qemu/qemu-server/docs v2 00/18] adapt to changes in QEMU machine version deprecation/removal Fiona Ebner
2025-01-16 11:50 ` [pve-devel] [PATCH qemu v2 01/18] adapt machine version deprecation for Proxmox VE Fiona Ebner
2025-01-16 11:50 ` [pve-devel] [PATCH qemu-server v2 02/18] machine: drop unused parameter from assert_valid_machine_property() helper Fiona Ebner
2025-01-16 11:50 ` [pve-devel] [PATCH qemu-server v2 03/18] move get_command_for_arch() helper to helpers module Fiona Ebner
2025-01-17 12:20   ` Thomas Lamprecht
2025-01-16 11:50 ` [pve-devel] [PATCH qemu-server v2 04/18] helpers: improve name for variable for mapping arch to binary Fiona Ebner
2025-01-17 12:19   ` Thomas Lamprecht
2025-01-16 11:50 ` [pve-devel] [PATCH qemu-server v2 05/18] move kvm_user_version() function to helpers module Fiona Ebner
2025-01-16 11:50 ` [pve-devel] [PATCH qemu-server v2 06/18] move get_vm_arch() helper " Fiona Ebner
2025-01-16 11:50 ` [pve-devel] [PATCH qemu-server v2 07/18] machine: add default_machine_for_arch() helper Fiona Ebner
2025-01-16 11:50 ` [pve-devel] [PATCH qemu-server v2 08/18] move get_installed_machine_version() helper to machine module Fiona Ebner
2025-01-16 11:50 ` [pve-devel] [PATCH qemu-server v2 09/18] move windows_get_pinned_machine_version() function " Fiona Ebner
2025-01-16 11:50 ` [pve-devel] [PATCH qemu-server v2 10/18] move get_vm_machine() " Fiona Ebner
2025-01-16 11:50 ` [pve-devel] [PATCH qemu-server v2 11/18] move meta information handling to its own module Fiona Ebner
2025-01-16 11:50 ` [pve-devel] [PATCH qemu-server v2 12/18] machine: get vm machine: fallback to creation QEMU version for windows starting with 9.1 Fiona Ebner
2025-01-17  9:19   ` Thomas Lamprecht
2025-01-17  9:27     ` Fiona Ebner [this message]
2025-01-17  9:58       ` Thomas Lamprecht
2025-01-16 11:50 ` [pve-devel] [PATCH qemu-server v2 13/18] machine: add check_and_pin_machine_string() helper Fiona Ebner
2025-01-16 11:50 ` [pve-devel] [PATCH qemu-server v2 14/18] api: update vm config: pin machine version when switching to windows os type Fiona Ebner
2025-01-16 11:50 ` [pve-devel] [PATCH qemu-server v2 15/18] machine: log informational line when pinning machine version for Windows guest Fiona Ebner
2025-01-16 11:50 ` [pve-devel] [PATCH qemu-server v2 16/18] machine: rename machine_version() function to machine_version_at_least() Fiona Ebner
2025-01-17 12:39   ` Thomas Lamprecht
2025-01-17 13:33     ` Fiona Ebner
2025-01-17 13:43       ` Thomas Lamprecht
2025-01-16 11:50 ` [pve-devel] [PATCH qemu-server v2 17/18] machine: code cleanup: avoid superfluous augmented assignment operator Fiona Ebner
2025-01-16 11:50 ` [pve-devel] [PATCH docs v2 18/18] qm: machine version: document support in PVE Fiona Ebner
2025-01-17 13:07   ` Thomas Lamprecht

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=28c27c6e-eb4a-4ff7-b3f6-ae4f0942fba5@proxmox.com \
    --to=f.ebner@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    --cc=t.lamprecht@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal