From 84a50d6ef01cf6d1ab3c22848d3f25bbc73e0f43 Mon Sep 17 00:00:00 2001 From: Dominik Csapak Date: Fri, 25 Oct 2019 14:36:06 +0200 Subject: [PATCH] fix #2434: extend machine regex with qemu 4.0.1, there is now a machine type pc-q35-4.0.1 which does not fit into our regex this broke live migration of q35, as we give the machine type (incl version info) to 'qm start' on the target node, which checks it against the JSONSchema to fix this, extend the regex to allow any number of version levels, for q35, i440fx and virt (to be more future proof) Signed-off-by: Dominik Csapak --- PVE/QemuServer.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 328a0d15..b635760a 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -91,7 +91,7 @@ PVE::JSONSchema::register_standard_option('pve-qm-image-format', { PVE::JSONSchema::register_standard_option('pve-qemu-machine', { description => "Specifies the Qemu machine type.", type => 'string', - pattern => '(pc|pc(-i440fx)?-\d+\.\d+(\.pxe)?|q35|pc-q35-\d+\.\d+(\.pxe)?|virt(?:-\d+\.\d+)?)', + pattern => '(pc|pc(-i440fx)?-\d+(\.\d+)+(\.pxe)?|q35|pc-q35-\d+(\.\d+)+(\.pxe)?|virt(?:-\d+(\.\d+)+)?)', maxLength => 40, optional => 1, });