On 11/25/19 4:36 PM, Stefan Reiter wrote: > On 11/25/19 4:13 PM, Thomas Lamprecht wrote: >> With our QEMU 4.1.1 package we can pass a additional internal version >> to QEMU's machine, it will be split out there and ignored, but >> returned on a QMP 'query-machines' call. >> >> This allows us to use it for increasing the granularity with which we >> can roll-out HW layout changes/additions for VMs. Until now we >> required a machine version bump, happening normally every major >> release of QEMU, with seldom, for us irrelevant, exceptions. >> This often delays rolling out a feature, which would break >> live-migration, by several months. That can now be avoided, the new >> "pve-version" component of the machine can be bumped at will, and >> thus we are much more flexible. >> >> That versions orders after the ($major, $minor) version components >> from an stable release - it can thus also be reset on the next >> release. >> >> The implementation extends the qemu-machine REGEX, remembers >> "pve-version" when doing a "query-machines" and integrates support >> into the min_version and extract_version helpers. >> >> We start out with a version of 1. >> >> Signed-off-by: Thomas Lamprecht <t.lampre...@proxmox.com> >> --- >> >> changes v1 -> v2: >> * drop an unrelated hunk mistakenly included from rebase >> * set version also when config machine is set explicitly to 'pc' or 'q35' >> * fix a missing '?' in the qemu-machine option pattern part for q35 >> * fix comment and some typos >> >> PVE/QemuServer.pm | 17 ++++++++------ >> PVE/QemuServer/Helpers.pm | 6 ++--- >> PVE/QemuServer/Machine.pm | 27 +++++++++++++++++----- >> test/cfg2cmd/i440fx-win10-hostpci.conf.cmd | 2 +- >> test/cfg2cmd/minimal-defaults.conf.cmd | 2 +- >> test/cfg2cmd/q35-linux-hostpci.conf.cmd | 2 +- >> test/cfg2cmd/q35-win10-hostpci.conf.cmd | 2 +- >> test/cfg2cmd/spice-linux-4.1.conf.cmd | 2 +- >> 8 files changed, 39 insertions(+), 21 deletions(-) >> >> diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm >> index 89254fb..55684b8 100644 >> --- a/PVE/QemuServer.pm >> +++ b/PVE/QemuServer.pm >> [...] >> @@ -3361,13 +3361,14 @@ my $default_machines = { >> }; >> sub get_vm_machine { >> - my ($conf, $forcemachine, $arch) = @_; >> + my ($conf, $forcemachine, $arch, $add_pve_version) = @_; >> my $machine = $forcemachine || $conf->{machine}; >> - if (!$machine) { >> + if (!$machine || $machine =~ m/^(?:pc|q35)$/) { > > I think technically this would have to include 'virt' too - but that's only > used for aarch AFAICT? >
Yeah not really supported, still fixed for completeness sake - thanks! > > Anyway, > > Reviewed-by: Stefan Reiter <s.rei...@proxmox.com> > > if you want :) I do want, thanks! :) With your R-b and the "virt" change above: applied _______________________________________________ pve-devel mailing list pve-devel@pve.proxmox.com https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel