]> git.proxmox.com Git - qemu-server.git/commitdiff
vm start: add warning about deprecated machine version
authorFiona Ebner <f.ebner@proxmox.com>
Fri, 10 Nov 2023 13:24:51 +0000 (14:24 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Sun, 12 Nov 2023 17:48:01 +0000 (18:48 +0100)
While there already is a warning from QEMU proper, that one is not
visible as a task warning and it's not straightforward to make it be
one, because QEMU is started inside a run_fork(). It's also more
future-proof to have the detection explicit on our side and the
documentation can be referenced.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
PVE/QemuServer.pm

index 9811eba19106f570ba28aac8d40d4b2e8f6d58b9..c465fb6f64ae30dec5112fc4439f9181c2eba4e9 100644 (file)
@@ -6021,6 +6021,15 @@ sub vm_start_nolock {
 
     PVE::GuestHelpers::exec_hookscript($conf, $vmid, 'post-start');
 
+    my ($current_machine, $is_deprecated) =
+       PVE::QemuServer::Machine::get_current_qemu_machine($vmid);
+    if ($is_deprecated) {
+       log_warn(
+           "current machine version '$current_machine' is deprecated - see the documentation and ".
+           "change to a newer one",
+       );
+    }
+
     return $res;
 }