[pve-devel] [PATCH qemu-server] fix #2434: extend machine regex
Dominik Csapak
d.csapak at proxmox.com
Fri Oct 25 14:36:06 CEST 2019
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 <d.csapak at proxmox.com>
---
PVE/QemuServer.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 328a0d1..b635760 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,
});
--
2.20.1
More information about the pve-devel
mailing list