[pve-devel] [PATCH 2/4] config: meta: also save the QEMU version installed during creation

Thomas Lamprecht t.lamprecht at proxmox.com
Thu Oct 21 10:36:07 CEST 2021


This is intended to be used to apply some workarounds for the
non-windows ostyped VMs which we'd still like to not pin on a
specific machine version, as normally Linux et al. can cope with such
changes on fresh boot just fine and until now this was a once every
few year issue (albeit systemd's "predictable" interface naming has
some potential to pick up on churn frequency).

Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---
 PVE/QemuServer.pm | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 639ccd0..b10f1b5 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -285,6 +285,12 @@ my $meta_info_fmt = {
 	minimum => 0,
 	optional => 1,
     },
+    'creation-qemu' => {
+	type => 'string',
+	description => "The QEMU (machine) version from the time this VM was created.",
+	pattern => '\d+(\.\d+)+',
+	optional => 1,
+    },
 };
 
 my $confdesc = {
@@ -2126,6 +2132,7 @@ sub new_meta_info_string {
 
     return PVE::JSONSchema::print_property_string(
 	{
+	    'creation-qemu' => kvm_user_version(),
 	    ctime => "". int(time()),
 	},
 	$meta_info_fmt
-- 
2.30.2






More information about the pve-devel mailing list