From: Fiona Ebner <f.ebner@proxmox.com>
To: Maximiliano Sandoval <m.sandoval@proxmox.com>,
pve-devel@lists.proxmox.com
Subject: Re: [PATCH qemu-server v2 2/2] vm start: log qemu version when starting a VM
Date: Tue, 30 Jun 2026 10:08:41 +0200 [thread overview]
Message-ID: <30d7c444-a59b-48f9-89f5-47ebb6fcba01@proxmox.com> (raw)
In-Reply-To: <20260630070351.55073-3-m.sandoval@proxmox.com>
Am 30.06.26 um 9:04 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 cdf66e89..3ecd16a7 100644
> --- a/src/PVE/QemuServer.pm
> +++ b/src/PVE/QemuServer.pm
> @@ -5853,7 +5853,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 $pkg_version = get_qemu_package_version($vmid);
> + syslog("info", "VM $vmid started with PID $pid using $pkg_version.");
>
> PVE::QemuServer::RunState::create_cleanup_flag($vmid);
>
> @@ -8068,6 +8069,12 @@ sub get_running_qemu_version {
> return "$res->{qemu}->{major}.$res->{qemu}->{minor}";
> }
>
> +sub get_qemu_package_version {
If you want to keep it beside get_running_qemu_version(), then that one
should be moved to QMPHelpers as well. The main QemuServer.pm module is
already bloated enough. We should take the opportunities to reduce it.
> + my ($vmid) = @_;
> + my $res = mon_cmd($vmid, "query-version");
> + return $res->{package};
> +}> +
> sub qemu_use_old_bios_files {
> my ($machine_type) = @_;
>
next prev parent reply other threads:[~2026-06-30 8:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-30 7:03 [PATCH qemu-server v2 0/1] vm start: log qemu version when starting a VM Maximiliano Sandoval
2026-06-30 7:03 ` [PATCH qemu-server v2 1/2] test: mock query-version qmp command Maximiliano Sandoval
2026-06-30 7:03 ` [PATCH qemu-server v2 2/2] vm start: log qemu version when starting a VM Maximiliano Sandoval
2026-06-30 8:08 ` Fiona Ebner [this message]
2026-06-30 11:13 ` superseded: [PATCH qemu-server v2 0/1] " Maximiliano Sandoval
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=30d7c444-a59b-48f9-89f5-47ebb6fcba01@proxmox.com \
--to=f.ebner@proxmox.com \
--cc=m.sandoval@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox