5
0
mirror of git://git.proxmox.com/git/qemu-server.git synced 2025-01-24 02:04:10 +03:00

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 <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak 2019-10-25 14:36:06 +02:00 committed by Thomas Lamprecht
parent dfda979e61
commit 84a50d6ef0

View File

@ -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,
});