all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Maximiliano Sandoval <m.sandoval@proxmox.com>
To: Fiona Ebner <f.ebner@proxmox.com>
Cc: pve-devel@lists.proxmox.com
Subject: Re: [PATCH qemu-server 2/2] vm start: log qemu version when starting a VM
Date: Tue, 30 Jun 2026 08:41:22 +0200	[thread overview]
Message-ID: <s8o33y4fs31.fsf@toolbox> (raw)
In-Reply-To: <1e8aeca4-ca85-428f-98c0-ea4e2a49af05@proxmox.com> (Fiona Ebner's message of "Mon, 29 Jun 2026 16:12:12 +0200")

Fiona Ebner <f.ebner@proxmox.com> writes:

> Am 24.06.26 um 10:42 AM schrieb Maximiliano Sandoval:
>> Previously, having the system journal and task logs from a boot was not
>> enough to determine which qemu version is installed nor the running QEMU
>> version of a VM. This is addressed by logging pve-qemu-kvm's package
>> version when starting the VM.
>> 
>> The package version is obtained with the 'query-version' qmp command.
>> 
>> Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
>> ---
>> 
>> Notes:
>>     sample output in the journal:
>>     
>>     Jun 24 10:39:14 pve-148 qm[26137]: VM 100 started with PID 26166 using pve-qemu-kvm_11.0.0-4.
>> 
>>  src/PVE/QemuServer.pm | 9 ++++++++-
>>  1 file changed, 8 insertions(+), 1 deletion(-)
>> 
>> diff --git a/src/PVE/QemuServer.pm b/src/PVE/QemuServer.pm
>> index 55e9f520..d6576a41 100644
>> --- a/src/PVE/QemuServer.pm
>> +++ b/src/PVE/QemuServer.pm
>> @@ -5839,7 +5839,8 @@ sub vm_start_nolock {
>>      eval { PVE::QemuServer::PCI::reserve_pci_usage($pci_reserve_list, $vmid, undef, $pid) };
>>      warn $@ if $@;
>>  
>> -    syslog("info", "VM $vmid started with PID $pid.");
>> +    my $pgk_version = get_package_version($vmid);
>
> Typo: pgk
>
>> +    syslog("info", "VM $vmid started with PID $pid using $pgk_version.");
>>  
>>      PVE::QemuServer::RunState::create_cleanup_flag($vmid);
>>  
>> @@ -8054,6 +8055,12 @@ sub get_running_qemu_version {
>>      return "$res->{qemu}->{major}.$res->{qemu}->{minor}";
>>  }
>>  
>> +sub get_package_version {
>
> This should live in QMPHelpers.pm. Then it's automatically clear that it
> is queried via QMP when you're reading the code of a call site. Also,
> maybe get_qemu_package_version() to be even more explicit.
>

It is there because get_running_qemu_version is above.

>> +    my ($vmid) = @_;
>> +    my $res = mon_cmd($vmid, "query-version");
>> +    return $res->{package};
>> +}
>> +
>>  sub qemu_use_old_bios_files {
>>      my ($machine_type) = @_;
>>  

-- 
Maximiliano




  reply	other threads:[~2026-06-30  6:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-24  8:40 [PATCH qemu-server 1/2] test: mock query-version qmp command Maximiliano Sandoval
2026-06-24  8:40 ` [PATCH qemu-server 2/2] vm start: log qemu version when starting a VM Maximiliano Sandoval
2026-06-24  8:44   ` Maximiliano Sandoval
2026-06-29 14:12   ` Fiona Ebner
2026-06-30  6:41     ` Maximiliano Sandoval [this message]
2026-06-30  7:05     ` superseded: " Maximiliano Sandoval
2026-06-29 14:12 ` [PATCH qemu-server 1/2] test: mock query-version qmp command Fiona 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=s8o33y4fs31.fsf@toolbox \
    --to=m.sandoval@proxmox.com \
    --cc=f.ebner@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.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal