* [pve-devel] [PATCH qemu-server 1/3] tests: replaced somemachine&someothermachine with q35&pc
@ 2022-05-03 11:18 Markus Frank
2022-05-03 11:18 ` [pve-devel] [PATCH qemu-server] fix #3784: Parameter for guest vIOMMU & machine as property-string Markus Frank
` (4 more replies)
0 siblings, 5 replies; 9+ messages in thread
From: Markus Frank @ 2022-05-03 11:18 UTC (permalink / raw)
To: pve-devel
Needed for new machine parameter, because parse_property_string checks
the parameter with the regex-pattern and therefore the test-cases with
somemachine & someothermachine always fail.
Since they do not have a special meaning,
I changed somemachine & someothermachine to q35 & pc with sed
sed -i 's/somemachine/q35/g'
sed -i 's/someothermachine/pc/g'
Signed-off-by: Markus Frank <m.frank@proxmox.com>
---
test/snapshot-expected/commit/qemu-server/101.conf | 2 +-
test/snapshot-expected/commit/qemu-server/102.conf | 2 +-
test/snapshot-expected/commit/qemu-server/201.conf | 2 +-
test/snapshot-expected/commit/qemu-server/202.conf | 2 +-
test/snapshot-expected/commit/qemu-server/203.conf | 2 +-
test/snapshot-expected/create/qemu-server/102.conf | 2 +-
test/snapshot-expected/create/qemu-server/104.conf | 4 ++--
test/snapshot-expected/create/qemu-server/106.conf | 2 +-
test/snapshot-expected/create/qemu-server/301.conf | 2 +-
test/snapshot-expected/create/qemu-server/302.conf | 2 +-
test/snapshot-expected/delete/qemu-server/203.conf | 2 +-
test/snapshot-expected/delete/qemu-server/204.conf | 2 +-
test/snapshot-expected/prepare/qemu-server/102.conf | 2 +-
test/snapshot-expected/prepare/qemu-server/104.conf | 2 +-
test/snapshot-expected/rollback/qemu-server/101.conf | 2 +-
test/snapshot-expected/rollback/qemu-server/106.conf | 4 ++--
test/snapshot-expected/rollback/qemu-server/201.conf | 2 +-
test/snapshot-expected/rollback/qemu-server/202.conf | 2 +-
test/snapshot-expected/rollback/qemu-server/203.conf | 2 +-
test/snapshot-expected/rollback/qemu-server/204.conf | 2 +-
test/snapshot-expected/rollback/qemu-server/205.conf | 2 +-
test/snapshot-expected/rollback/qemu-server/301.conf | 2 +-
test/snapshot-expected/rollback/qemu-server/302.conf | 2 +-
test/snapshot-expected/rollback/qemu-server/303.conf | 2 +-
test/snapshot-input/commit/qemu-server/101.conf | 2 +-
test/snapshot-input/commit/qemu-server/102.conf | 2 +-
test/snapshot-input/commit/qemu-server/201.conf | 2 +-
test/snapshot-input/commit/qemu-server/202.conf | 2 +-
test/snapshot-input/commit/qemu-server/203.conf | 2 +-
test/snapshot-input/create/qemu-server/104.conf | 2 +-
test/snapshot-input/delete/qemu-server/101.conf | 2 +-
test/snapshot-input/delete/qemu-server/203.conf | 2 +-
test/snapshot-input/delete/qemu-server/204.conf | 2 +-
test/snapshot-input/rollback/qemu-server/101.conf | 2 +-
test/snapshot-input/rollback/qemu-server/102.conf | 2 +-
test/snapshot-input/rollback/qemu-server/103.conf | 2 +-
test/snapshot-input/rollback/qemu-server/104.conf | 2 +-
test/snapshot-input/rollback/qemu-server/106.conf | 4 ++--
test/snapshot-input/rollback/qemu-server/201.conf | 2 +-
test/snapshot-input/rollback/qemu-server/202.conf | 2 +-
test/snapshot-input/rollback/qemu-server/203.conf | 2 +-
test/snapshot-input/rollback/qemu-server/204.conf | 2 +-
test/snapshot-input/rollback/qemu-server/205.conf | 2 +-
test/snapshot-input/rollback/qemu-server/301.conf | 2 +-
test/snapshot-input/rollback/qemu-server/302.conf | 2 +-
test/snapshot-input/rollback/qemu-server/303.conf | 2 +-
46 files changed, 49 insertions(+), 49 deletions(-)
diff --git a/test/snapshot-expected/commit/qemu-server/101.conf b/test/snapshot-expected/commit/qemu-server/101.conf
index 060676e..82c9522 100644
--- a/test/snapshot-expected/commit/qemu-server/101.conf
+++ b/test/snapshot-expected/commit/qemu-server/101.conf
@@ -18,7 +18,7 @@ bootdisk: ide0
cores: 4
ide0: somestore:somedisk,discard=on,size=32G
ide2: none,media=cdrom
-machine: somemachine
+machine: q35
memory: 8192
name: win
net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
diff --git a/test/snapshot-expected/commit/qemu-server/102.conf b/test/snapshot-expected/commit/qemu-server/102.conf
index 13f33a3..01b8531 100644
--- a/test/snapshot-expected/commit/qemu-server/102.conf
+++ b/test/snapshot-expected/commit/qemu-server/102.conf
@@ -34,7 +34,7 @@ bootdisk: ide0
cores: 4
ide0: somestore:somedisk,discard=on,size=32G
ide2: none,media=cdrom
-machine: somemachine
+machine: q35
memory: 8192
name: win
net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
diff --git a/test/snapshot-expected/commit/qemu-server/201.conf b/test/snapshot-expected/commit/qemu-server/201.conf
index 63a6d77..f8e99dd 100644
--- a/test/snapshot-expected/commit/qemu-server/201.conf
+++ b/test/snapshot-expected/commit/qemu-server/201.conf
@@ -34,7 +34,7 @@ bootdisk: ide0
cores: 4
ide0: somestore:somedisk,discard=on,size=32G
ide2: none,media=cdrom
-machine: somemachine
+machine: q35
memory: 8192
name: win
net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
diff --git a/test/snapshot-expected/commit/qemu-server/202.conf b/test/snapshot-expected/commit/qemu-server/202.conf
index 4c6b84d..a221ba0 100644
--- a/test/snapshot-expected/commit/qemu-server/202.conf
+++ b/test/snapshot-expected/commit/qemu-server/202.conf
@@ -35,7 +35,7 @@ bootdisk: ide0
cores: 4
ide0: somestore:somedisk,discard=on,size=32G
ide2: none,media=cdrom
-machine: somemachine
+machine: q35
memory: 8192
name: win
net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
diff --git a/test/snapshot-expected/commit/qemu-server/203.conf b/test/snapshot-expected/commit/qemu-server/203.conf
index 5acf20d..e10b68e 100644
--- a/test/snapshot-expected/commit/qemu-server/203.conf
+++ b/test/snapshot-expected/commit/qemu-server/203.conf
@@ -35,7 +35,7 @@ bootdisk: ide0
cores: 4
ide0: somestore:somedisk,discard=on,size=32G
ide2: none,media=cdrom
-machine: somemachine
+machine: q35
memory: 8192
name: win
net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
diff --git a/test/snapshot-expected/create/qemu-server/102.conf b/test/snapshot-expected/create/qemu-server/102.conf
index 9b57004..d507956 100644
--- a/test/snapshot-expected/create/qemu-server/102.conf
+++ b/test/snapshot-expected/create/qemu-server/102.conf
@@ -25,7 +25,7 @@ name: win
net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
numa: 0
ostype: win7
-runningmachine: somemachine
+runningmachine: q35
smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
snaptime: 1234567890
sockets: 1
diff --git a/test/snapshot-expected/create/qemu-server/104.conf b/test/snapshot-expected/create/qemu-server/104.conf
index 54f1c21..385625f 100644
--- a/test/snapshot-expected/create/qemu-server/104.conf
+++ b/test/snapshot-expected/create/qemu-server/104.conf
@@ -20,7 +20,7 @@ bootdisk: ide0
cores: 4
ide0: local:snapshotable-disk-1,discard=on,size=32G
ide2: none,media=cdrom
-machine: somemachine
+machine: q35
memory: 8192
name: win
net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
@@ -45,7 +45,7 @@ net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
numa: 0
ostype: win7
parent: test
-runningmachine: somemachine
+runningmachine: q35
smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
snaptime: 1234567890
sockets: 1
diff --git a/test/snapshot-expected/create/qemu-server/106.conf b/test/snapshot-expected/create/qemu-server/106.conf
index 9b57004..d507956 100644
--- a/test/snapshot-expected/create/qemu-server/106.conf
+++ b/test/snapshot-expected/create/qemu-server/106.conf
@@ -25,7 +25,7 @@ name: win
net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
numa: 0
ostype: win7
-runningmachine: somemachine
+runningmachine: q35
smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
snaptime: 1234567890
sockets: 1
diff --git a/test/snapshot-expected/create/qemu-server/301.conf b/test/snapshot-expected/create/qemu-server/301.conf
index 9c49b1d..8cba2dc 100644
--- a/test/snapshot-expected/create/qemu-server/301.conf
+++ b/test/snapshot-expected/create/qemu-server/301.conf
@@ -25,7 +25,7 @@ name: win
net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
numa: 0
ostype: win7
-runningmachine: somemachine
+runningmachine: q35
smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
snaptime: 1234567890
sockets: 1
diff --git a/test/snapshot-expected/create/qemu-server/302.conf b/test/snapshot-expected/create/qemu-server/302.conf
index 9c49b1d..8cba2dc 100644
--- a/test/snapshot-expected/create/qemu-server/302.conf
+++ b/test/snapshot-expected/create/qemu-server/302.conf
@@ -25,7 +25,7 @@ name: win
net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
numa: 0
ostype: win7
-runningmachine: somemachine
+runningmachine: q35
smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
snaptime: 1234567890
sockets: 1
diff --git a/test/snapshot-expected/delete/qemu-server/203.conf b/test/snapshot-expected/delete/qemu-server/203.conf
index c406640..ed93cf7 100644
--- a/test/snapshot-expected/delete/qemu-server/203.conf
+++ b/test/snapshot-expected/delete/qemu-server/203.conf
@@ -21,7 +21,7 @@ bootdisk: ide0
cores: 4
ide0: local:snapshotable-disk-1,discard=on,size=32G
ide2: none,media=cdrom
-machine: somemachine
+machine: q35
memory: 8192
name: win
net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
diff --git a/test/snapshot-expected/delete/qemu-server/204.conf b/test/snapshot-expected/delete/qemu-server/204.conf
index c521154..fe63204 100644
--- a/test/snapshot-expected/delete/qemu-server/204.conf
+++ b/test/snapshot-expected/delete/qemu-server/204.conf
@@ -20,7 +20,7 @@ bootdisk: ide0
cores: 4
ide0: local:snapshotable-disk-1,discard=on,size=32G
ide2: none,media=cdrom
-machine: somemachine
+machine: q35
memory: 8192
name: win
net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
diff --git a/test/snapshot-expected/prepare/qemu-server/102.conf b/test/snapshot-expected/prepare/qemu-server/102.conf
index 92db74a..8f998ca 100644
--- a/test/snapshot-expected/prepare/qemu-server/102.conf
+++ b/test/snapshot-expected/prepare/qemu-server/102.conf
@@ -23,7 +23,7 @@ name: win
net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
numa: 0
ostype: win7
-runningmachine: somemachine
+runningmachine: q35
smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
snapstate: prepare
snaptime: 1234567890
diff --git a/test/snapshot-expected/prepare/qemu-server/104.conf b/test/snapshot-expected/prepare/qemu-server/104.conf
index 02e2d3c..2f2ec96 100644
--- a/test/snapshot-expected/prepare/qemu-server/104.conf
+++ b/test/snapshot-expected/prepare/qemu-server/104.conf
@@ -41,7 +41,7 @@ net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
numa: 0
ostype: win7
parent: test
-runningmachine: somemachine
+runningmachine: q35
smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
snapstate: prepare
snaptime: 1234567890
diff --git a/test/snapshot-expected/rollback/qemu-server/101.conf b/test/snapshot-expected/rollback/qemu-server/101.conf
index 91de880..17257e3 100644
--- a/test/snapshot-expected/rollback/qemu-server/101.conf
+++ b/test/snapshot-expected/rollback/qemu-server/101.conf
@@ -21,7 +21,7 @@ bootdisk: ide0
cores: 4
ide0: local:snapshotable-disk-1,discard=on,size=32G
ide2: none,media=cdrom
-machine: somemachine
+machine: q35
memory: 8192
name: win
net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
diff --git a/test/snapshot-expected/rollback/qemu-server/106.conf b/test/snapshot-expected/rollback/qemu-server/106.conf
index aa5fa9e..729bc93 100644
--- a/test/snapshot-expected/rollback/qemu-server/106.conf
+++ b/test/snapshot-expected/rollback/qemu-server/106.conf
@@ -3,7 +3,7 @@ bootdisk: ide0
cores: 4
ide0: local:snapshotable-disk-1,discard=on,size=32G
ide2: none,media=cdrom
-machine: somemachine
+machine: q35
memory: 8192
name: win
net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
@@ -21,7 +21,7 @@ bootdisk: ide0
cores: 4
ide0: local:snapshotable-disk-1,discard=on,size=32G
ide2: none,media=cdrom
-machine: somemachine
+machine: q35
memory: 8192
name: win
net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
diff --git a/test/snapshot-expected/rollback/qemu-server/201.conf b/test/snapshot-expected/rollback/qemu-server/201.conf
index c521154..fe63204 100644
--- a/test/snapshot-expected/rollback/qemu-server/201.conf
+++ b/test/snapshot-expected/rollback/qemu-server/201.conf
@@ -20,7 +20,7 @@ bootdisk: ide0
cores: 4
ide0: local:snapshotable-disk-1,discard=on,size=32G
ide2: none,media=cdrom
-machine: somemachine
+machine: q35
memory: 8192
name: win
net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
diff --git a/test/snapshot-expected/rollback/qemu-server/202.conf b/test/snapshot-expected/rollback/qemu-server/202.conf
index 691f5a2..d09b5d0 100644
--- a/test/snapshot-expected/rollback/qemu-server/202.conf
+++ b/test/snapshot-expected/rollback/qemu-server/202.conf
@@ -20,7 +20,7 @@ bootdisk: ide0
cores: 4
ide0: local:unsnapshotable-disk-1,discard=on,size=32G
ide2: none,media=cdrom
-machine: somemachine
+machine: q35
memory: 8192
name: win
net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
diff --git a/test/snapshot-expected/rollback/qemu-server/203.conf b/test/snapshot-expected/rollback/qemu-server/203.conf
index 6e53b27..8abf841 100644
--- a/test/snapshot-expected/rollback/qemu-server/203.conf
+++ b/test/snapshot-expected/rollback/qemu-server/203.conf
@@ -20,7 +20,7 @@ bootdisk: ide0
cores: 4
ide0: local:snapshotable-disk-1,discard=on,size=32G
ide2: none,media=cdrom
-machine: somemachine
+machine: q35
memory: 8192
name: win
net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
diff --git a/test/snapshot-expected/rollback/qemu-server/204.conf b/test/snapshot-expected/rollback/qemu-server/204.conf
index c406640..ed93cf7 100644
--- a/test/snapshot-expected/rollback/qemu-server/204.conf
+++ b/test/snapshot-expected/rollback/qemu-server/204.conf
@@ -21,7 +21,7 @@ bootdisk: ide0
cores: 4
ide0: local:snapshotable-disk-1,discard=on,size=32G
ide2: none,media=cdrom
-machine: somemachine
+machine: q35
memory: 8192
name: win
net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
diff --git a/test/snapshot-expected/rollback/qemu-server/205.conf b/test/snapshot-expected/rollback/qemu-server/205.conf
index c521154..fe63204 100644
--- a/test/snapshot-expected/rollback/qemu-server/205.conf
+++ b/test/snapshot-expected/rollback/qemu-server/205.conf
@@ -20,7 +20,7 @@ bootdisk: ide0
cores: 4
ide0: local:snapshotable-disk-1,discard=on,size=32G
ide2: none,media=cdrom
-machine: somemachine
+machine: q35
memory: 8192
name: win
net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
diff --git a/test/snapshot-expected/rollback/qemu-server/301.conf b/test/snapshot-expected/rollback/qemu-server/301.conf
index c521154..fe63204 100644
--- a/test/snapshot-expected/rollback/qemu-server/301.conf
+++ b/test/snapshot-expected/rollback/qemu-server/301.conf
@@ -20,7 +20,7 @@ bootdisk: ide0
cores: 4
ide0: local:snapshotable-disk-1,discard=on,size=32G
ide2: none,media=cdrom
-machine: somemachine
+machine: q35
memory: 8192
name: win
net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
diff --git a/test/snapshot-expected/rollback/qemu-server/302.conf b/test/snapshot-expected/rollback/qemu-server/302.conf
index 828e8b0..5110016 100644
--- a/test/snapshot-expected/rollback/qemu-server/302.conf
+++ b/test/snapshot-expected/rollback/qemu-server/302.conf
@@ -27,7 +27,7 @@ name: win
net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
numa: 0
ostype: win7
-runningmachine: somemachine
+runningmachine: q35
smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
snaptime: 1234567890
sockets: 1
diff --git a/test/snapshot-expected/rollback/qemu-server/303.conf b/test/snapshot-expected/rollback/qemu-server/303.conf
index 518c954..473a9a0 100644
--- a/test/snapshot-expected/rollback/qemu-server/303.conf
+++ b/test/snapshot-expected/rollback/qemu-server/303.conf
@@ -26,7 +26,7 @@ name: win
net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
numa: 0
ostype: win7
-runningmachine: somemachine
+runningmachine: q35
smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
snaptime: 1234567890
sockets: 1
diff --git a/test/snapshot-input/commit/qemu-server/101.conf b/test/snapshot-input/commit/qemu-server/101.conf
index 4ab1787..92c1f6a 100644
--- a/test/snapshot-input/commit/qemu-server/101.conf
+++ b/test/snapshot-input/commit/qemu-server/101.conf
@@ -18,7 +18,7 @@ bootdisk: ide0
cores: 4
ide0: somestore:somedisk,discard=on,size=32G
ide2: none,media=cdrom
-machine: somemachine
+machine: q35
memory: 8192
name: win
net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
diff --git a/test/snapshot-input/commit/qemu-server/102.conf b/test/snapshot-input/commit/qemu-server/102.conf
index b62f2c6..99bca5e 100644
--- a/test/snapshot-input/commit/qemu-server/102.conf
+++ b/test/snapshot-input/commit/qemu-server/102.conf
@@ -35,7 +35,7 @@ bootdisk: ide0
cores: 4
ide0: somestore:somedisk,discard=on,size=32G
ide2: none,media=cdrom
-machine: somemachine
+machine: q35
memory: 8192
name: win
net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
diff --git a/test/snapshot-input/commit/qemu-server/201.conf b/test/snapshot-input/commit/qemu-server/201.conf
index 63a6d77..f8e99dd 100644
--- a/test/snapshot-input/commit/qemu-server/201.conf
+++ b/test/snapshot-input/commit/qemu-server/201.conf
@@ -34,7 +34,7 @@ bootdisk: ide0
cores: 4
ide0: somestore:somedisk,discard=on,size=32G
ide2: none,media=cdrom
-machine: somemachine
+machine: q35
memory: 8192
name: win
net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
diff --git a/test/snapshot-input/commit/qemu-server/202.conf b/test/snapshot-input/commit/qemu-server/202.conf
index 4c6b84d..a221ba0 100644
--- a/test/snapshot-input/commit/qemu-server/202.conf
+++ b/test/snapshot-input/commit/qemu-server/202.conf
@@ -35,7 +35,7 @@ bootdisk: ide0
cores: 4
ide0: somestore:somedisk,discard=on,size=32G
ide2: none,media=cdrom
-machine: somemachine
+machine: q35
memory: 8192
name: win
net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
diff --git a/test/snapshot-input/commit/qemu-server/203.conf b/test/snapshot-input/commit/qemu-server/203.conf
index 5acf20d..e10b68e 100644
--- a/test/snapshot-input/commit/qemu-server/203.conf
+++ b/test/snapshot-input/commit/qemu-server/203.conf
@@ -35,7 +35,7 @@ bootdisk: ide0
cores: 4
ide0: somestore:somedisk,discard=on,size=32G
ide2: none,media=cdrom
-machine: somemachine
+machine: q35
memory: 8192
name: win
net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
diff --git a/test/snapshot-input/create/qemu-server/104.conf b/test/snapshot-input/create/qemu-server/104.conf
index c521154..fe63204 100644
--- a/test/snapshot-input/create/qemu-server/104.conf
+++ b/test/snapshot-input/create/qemu-server/104.conf
@@ -20,7 +20,7 @@ bootdisk: ide0
cores: 4
ide0: local:snapshotable-disk-1,discard=on,size=32G
ide2: none,media=cdrom
-machine: somemachine
+machine: q35
memory: 8192
name: win
net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
diff --git a/test/snapshot-input/delete/qemu-server/101.conf b/test/snapshot-input/delete/qemu-server/101.conf
index c521154..fe63204 100644
--- a/test/snapshot-input/delete/qemu-server/101.conf
+++ b/test/snapshot-input/delete/qemu-server/101.conf
@@ -20,7 +20,7 @@ bootdisk: ide0
cores: 4
ide0: local:snapshotable-disk-1,discard=on,size=32G
ide2: none,media=cdrom
-machine: somemachine
+machine: q35
memory: 8192
name: win
net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
diff --git a/test/snapshot-input/delete/qemu-server/203.conf b/test/snapshot-input/delete/qemu-server/203.conf
index c406640..ed93cf7 100644
--- a/test/snapshot-input/delete/qemu-server/203.conf
+++ b/test/snapshot-input/delete/qemu-server/203.conf
@@ -21,7 +21,7 @@ bootdisk: ide0
cores: 4
ide0: local:snapshotable-disk-1,discard=on,size=32G
ide2: none,media=cdrom
-machine: somemachine
+machine: q35
memory: 8192
name: win
net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
diff --git a/test/snapshot-input/delete/qemu-server/204.conf b/test/snapshot-input/delete/qemu-server/204.conf
index c521154..fe63204 100644
--- a/test/snapshot-input/delete/qemu-server/204.conf
+++ b/test/snapshot-input/delete/qemu-server/204.conf
@@ -20,7 +20,7 @@ bootdisk: ide0
cores: 4
ide0: local:snapshotable-disk-1,discard=on,size=32G
ide2: none,media=cdrom
-machine: somemachine
+machine: q35
memory: 8192
name: win
net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
diff --git a/test/snapshot-input/rollback/qemu-server/101.conf b/test/snapshot-input/rollback/qemu-server/101.conf
index 4fea865..0fa6a61 100644
--- a/test/snapshot-input/rollback/qemu-server/101.conf
+++ b/test/snapshot-input/rollback/qemu-server/101.conf
@@ -20,7 +20,7 @@ bootdisk: ide0
cores: 4
ide0: local:snapshotable-disk-1,discard=on,size=32G
ide2: none,media=cdrom
-machine: somemachine
+machine: q35
memory: 8192
name: win
net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
diff --git a/test/snapshot-input/rollback/qemu-server/102.conf b/test/snapshot-input/rollback/qemu-server/102.conf
index 8f0db83..3fcffe1 100644
--- a/test/snapshot-input/rollback/qemu-server/102.conf
+++ b/test/snapshot-input/rollback/qemu-server/102.conf
@@ -4,7 +4,7 @@ bootdisk: ide2
cores: 2
ide0: local:snapshotable-disk-1,size=32G
ide2: none,media=cdrom
-machine: someothermachine
+machine: pc
memory: 4096
name: win
net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
diff --git a/test/snapshot-input/rollback/qemu-server/103.conf b/test/snapshot-input/rollback/qemu-server/103.conf
index 8f0db83..3fcffe1 100644
--- a/test/snapshot-input/rollback/qemu-server/103.conf
+++ b/test/snapshot-input/rollback/qemu-server/103.conf
@@ -4,7 +4,7 @@ bootdisk: ide2
cores: 2
ide0: local:snapshotable-disk-1,size=32G
ide2: none,media=cdrom
-machine: someothermachine
+machine: pc
memory: 4096
name: win
net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
diff --git a/test/snapshot-input/rollback/qemu-server/104.conf b/test/snapshot-input/rollback/qemu-server/104.conf
index ff50151..2f12761 100644
--- a/test/snapshot-input/rollback/qemu-server/104.conf
+++ b/test/snapshot-input/rollback/qemu-server/104.conf
@@ -4,7 +4,7 @@ bootdisk: ide2
cores: 2
ide0: local:snapshotable-disk-1,size=32G
ide2: none,media=cdrom
-machine: someothermachine
+machine: pc
memory: 4096
name: win
net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
diff --git a/test/snapshot-input/rollback/qemu-server/106.conf b/test/snapshot-input/rollback/qemu-server/106.conf
index 64bf9bf..56d7199 100644
--- a/test/snapshot-input/rollback/qemu-server/106.conf
+++ b/test/snapshot-input/rollback/qemu-server/106.conf
@@ -3,7 +3,7 @@ bootdisk: ide0
cores: 4
ide0: local:snapshotable-disk-1,discard=on,size=32G
ide2: none,media=cdrom
-machine: someothermachine
+machine: pc
memory: 8192
name: win
net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
@@ -21,7 +21,7 @@ bootdisk: ide0
cores: 4
ide0: local:snapshotable-disk-1,discard=on,size=32G
ide2: none,media=cdrom
-machine: somemachine
+machine: q35
memory: 8192
name: win
net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
diff --git a/test/snapshot-input/rollback/qemu-server/201.conf b/test/snapshot-input/rollback/qemu-server/201.conf
index c521154..fe63204 100644
--- a/test/snapshot-input/rollback/qemu-server/201.conf
+++ b/test/snapshot-input/rollback/qemu-server/201.conf
@@ -20,7 +20,7 @@ bootdisk: ide0
cores: 4
ide0: local:snapshotable-disk-1,discard=on,size=32G
ide2: none,media=cdrom
-machine: somemachine
+machine: q35
memory: 8192
name: win
net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
diff --git a/test/snapshot-input/rollback/qemu-server/202.conf b/test/snapshot-input/rollback/qemu-server/202.conf
index 691f5a2..d09b5d0 100644
--- a/test/snapshot-input/rollback/qemu-server/202.conf
+++ b/test/snapshot-input/rollback/qemu-server/202.conf
@@ -20,7 +20,7 @@ bootdisk: ide0
cores: 4
ide0: local:unsnapshotable-disk-1,discard=on,size=32G
ide2: none,media=cdrom
-machine: somemachine
+machine: q35
memory: 8192
name: win
net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
diff --git a/test/snapshot-input/rollback/qemu-server/203.conf b/test/snapshot-input/rollback/qemu-server/203.conf
index 6e53b27..8abf841 100644
--- a/test/snapshot-input/rollback/qemu-server/203.conf
+++ b/test/snapshot-input/rollback/qemu-server/203.conf
@@ -20,7 +20,7 @@ bootdisk: ide0
cores: 4
ide0: local:snapshotable-disk-1,discard=on,size=32G
ide2: none,media=cdrom
-machine: somemachine
+machine: q35
memory: 8192
name: win
net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
diff --git a/test/snapshot-input/rollback/qemu-server/204.conf b/test/snapshot-input/rollback/qemu-server/204.conf
index c406640..ed93cf7 100644
--- a/test/snapshot-input/rollback/qemu-server/204.conf
+++ b/test/snapshot-input/rollback/qemu-server/204.conf
@@ -21,7 +21,7 @@ bootdisk: ide0
cores: 4
ide0: local:snapshotable-disk-1,discard=on,size=32G
ide2: none,media=cdrom
-machine: somemachine
+machine: q35
memory: 8192
name: win
net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
diff --git a/test/snapshot-input/rollback/qemu-server/205.conf b/test/snapshot-input/rollback/qemu-server/205.conf
index c521154..fe63204 100644
--- a/test/snapshot-input/rollback/qemu-server/205.conf
+++ b/test/snapshot-input/rollback/qemu-server/205.conf
@@ -20,7 +20,7 @@ bootdisk: ide0
cores: 4
ide0: local:snapshotable-disk-1,discard=on,size=32G
ide2: none,media=cdrom
-machine: somemachine
+machine: q35
memory: 8192
name: win
net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
diff --git a/test/snapshot-input/rollback/qemu-server/301.conf b/test/snapshot-input/rollback/qemu-server/301.conf
index c521154..fe63204 100644
--- a/test/snapshot-input/rollback/qemu-server/301.conf
+++ b/test/snapshot-input/rollback/qemu-server/301.conf
@@ -20,7 +20,7 @@ bootdisk: ide0
cores: 4
ide0: local:snapshotable-disk-1,discard=on,size=32G
ide2: none,media=cdrom
-machine: somemachine
+machine: q35
memory: 8192
name: win
net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
diff --git a/test/snapshot-input/rollback/qemu-server/302.conf b/test/snapshot-input/rollback/qemu-server/302.conf
index 518c954..473a9a0 100644
--- a/test/snapshot-input/rollback/qemu-server/302.conf
+++ b/test/snapshot-input/rollback/qemu-server/302.conf
@@ -26,7 +26,7 @@ name: win
net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
numa: 0
ostype: win7
-runningmachine: somemachine
+runningmachine: q35
smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
snaptime: 1234567890
sockets: 1
diff --git a/test/snapshot-input/rollback/qemu-server/303.conf b/test/snapshot-input/rollback/qemu-server/303.conf
index 518c954..473a9a0 100644
--- a/test/snapshot-input/rollback/qemu-server/303.conf
+++ b/test/snapshot-input/rollback/qemu-server/303.conf
@@ -26,7 +26,7 @@ name: win
net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
numa: 0
ostype: win7
-runningmachine: somemachine
+runningmachine: q35
smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
snaptime: 1234567890
sockets: 1
--
2.30.2
^ permalink raw reply [flat|nested] 9+ messages in thread
* [pve-devel] [PATCH qemu-server] fix #3784: Parameter for guest vIOMMU & machine as property-string
2022-05-03 11:18 [pve-devel] [PATCH qemu-server 1/3] tests: replaced somemachine&someothermachine with q35&pc Markus Frank
@ 2022-05-03 11:18 ` Markus Frank
2022-07-20 11:28 ` Markus Frank
2022-05-03 11:19 ` [pve-devel] [PATCH qemu-server] added test-cases for new machine-syntax & viommu Markus Frank
` (3 subsequent siblings)
4 siblings, 1 reply; 9+ messages in thread
From: Markus Frank @ 2022-05-03 11:18 UTC (permalink / raw)
To: pve-devel
Changed the machine parameter to allow multiple machine-specific
parameters via property_string, but also allow old configs (via
default_key)
possible-configurations-example:
machine: q35
machine: pc
machine: q35,viommu=1
machine: type=q35,viommu=1
Also added a Parameter for vIOMMU so nobody has to use a github-script
or change the kvm command on every vm boot.
The args parameter doesn't work because the -device parameter(kvm)
with intel-iommu has to be placed before the other arguments.
vIOMMU enables the option to pass through pci devices to guest-vms
inside guest-vms for nested Virtualisation.
Signed-off-by: Markus Frank <m.frank@proxmox.com>
---
PVE/API2/Qemu.pm | 7 ++---
PVE/QemuConfig.pm | 3 ++-
PVE/QemuServer.pm | 56 ++++++++++++++++++++++++++++++++++++---
PVE/QemuServer/Machine.pm | 6 +++--
4 files changed, 63 insertions(+), 9 deletions(-)
diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm
index 71db264..661227f 100644
--- a/PVE/API2/Qemu.pm
+++ b/PVE/API2/Qemu.pm
@@ -945,12 +945,13 @@ __PACKAGE__->register_method({
if ((!defined($conf->{vmgenid}) || $conf->{vmgenid} eq '1') && $arch ne 'aarch64') {
$conf->{vmgenid} = PVE::QemuServer::generate_uuid();
}
-
- my $machine = $conf->{machine};
+ my $machine_conf = PVE::QemuServer::parse_machine($conf->{machine});
+ my $machine = $machine_conf->{type};
if (!$machine || $machine =~ m/^(?:pc|q35|virt)$/) {
# always pin Windows' machine version on create, they get to easily confused
if (PVE::QemuServer::windows_version($conf->{ostype})) {
- $conf->{machine} = PVE::QemuServer::windows_get_pinned_machine_version($machine);
+ $machine_conf->{type} = PVE::QemuServer::windows_get_pinned_machine_version($machine);
+ $conf->{machine} = print_property_string($machine_conf);
}
}
diff --git a/PVE/QemuConfig.pm b/PVE/QemuConfig.pm
index cfef8d3..b82076f 100644
--- a/PVE/QemuConfig.pm
+++ b/PVE/QemuConfig.pm
@@ -430,7 +430,8 @@ sub __snapshot_rollback_hook {
} else {
# Note: old code did not store 'machine', so we try to be smart
# and guess the snapshot was generated with kvm 1.4 (pc-i440fx-1.4).
- $data->{forcemachine} = $conf->{machine} || 'pc-i440fx-1.4';
+ my $machine_conf = PVE::QemuServer::parse_machine($conf->{machine});
+ $data->{forcemachine} = $machine_conf->{type} || 'pc-i440fx-1.4';
# we remove the 'machine' configuration if not explicitly specified
# in the original config.
diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 5db10fe..fa2e449 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -111,6 +111,25 @@ PVE::JSONSchema::register_standard_option('pve-qm-stateuri', {
optional => 1,
});
+my $machine_fmt = {
+ type => {
+ default_key => 1,
+ type => 'string',
+ description => "Specifies the Qemu machine type.",
+ pattern => '(pc|pc(-i440fx)?-\d+(\.\d+)+(\+pve\d+)?(\.pxe)?|q35|pc-q35-\d+(\.\d+)+(\+pve\d+)?(\.pxe)?|virt(?:-\d+(\.\d+)+)?(\+pve\d+)?)',
+ format_description => "qemu-machine-type",
+ maxLength => 40,
+ optional => 1,
+ },
+ viommu => {
+ type => 'boolean',
+ description => "enable guest vIOMMU (needs kvm to be enabled and q35 to be set as machine)",
+ default => 0,
+ optional => 1,
+ },
+};
+PVE::JSONSchema::register_format('pve-qemu-machine-fmt', $machine_fmt);
+
PVE::JSONSchema::register_standard_option('pve-qemu-machine', {
description => "Specifies the Qemu machine type.",
type => 'string',
@@ -627,7 +646,12 @@ EODESCR
pattern => $PVE::QemuServer::CPUConfig::qemu_cmdline_cpu_re,
format_description => 'QEMU -cpu parameter'
},
- machine => get_standard_option('pve-qemu-machine'),
+ machine => {
+ description => "Specifies the Qemu machine type.",
+ type => 'string',
+ optional => 1,
+ format => 'pve-qemu-machine-fmt',
+ },
arch => {
description => "Virtual processor architecture. Defaults to the host.",
optional => 1,
@@ -2085,6 +2109,16 @@ sub parse_watchdog {
return $res;
}
+sub parse_machine {
+ my ($value) = @_;
+
+ return if !$value;
+
+ my $res = eval { parse_property_string($machine_fmt, $value) };
+ warn $@ if $@;
+ return $res;
+}
+
sub parse_guest_agent {
my ($conf) = @_;
@@ -2156,8 +2190,9 @@ sub qemu_created_version_fixups {
# check if we need to apply some handling for VMs that always use the latest machine version but
# had a machine version transition happen that affected HW such that, e.g., an OS config change
# would be required (we do not want to pin machine version for non-windows OS type)
+ my $machine_conf = parse_machine($conf->{machine});
if (
- (!defined($conf->{machine}) || $conf->{machine} =~ m/^(?:pc|q35|virt)$/) # non-versioned machine
+ (!defined($machine_conf->{type}) || $machine_conf->{type} =~ m/^(?:pc|q35|virt)$/) # non-versioned machine
&& (!defined($meta->{'creation-qemu'}) || !min_version($meta->{'creation-qemu'}, 6, 1)) # created before 6.1
&& (!$forced_vers || min_version($forced_vers, 6, 1)) # handle snapshot-rollback/migrations
&& min_version($kvmver, 6, 1) # only need to apply the change since 6.1
@@ -3257,7 +3292,8 @@ sub windows_get_pinned_machine_version {
sub get_vm_machine {
my ($conf, $forcemachine, $arch, $add_pve_version, $kvmversion) = @_;
- my $machine = $forcemachine || $conf->{machine};
+ my $machine_conf = parse_machine($conf->{machine});
+ my $machine = $forcemachine || $machine_conf->{type};
if (!$machine || $machine =~ m/^(?:pc|q35|virt)$/) {
$kvmversion //= kvm_user_version();
@@ -3472,6 +3508,8 @@ sub config_to_command {
my $kvm = $conf->{kvm};
my $nodename = nodename();
+ my $machine_conf = parse_machine($conf->{machine});
+
my $arch = get_vm_arch($conf);
my $kvm_binary = get_command_for_arch($arch);
my $kvmver = kvm_user_version($kvm_binary);
@@ -3525,6 +3563,14 @@ sub config_to_command {
my $use_old_bios_files = undef;
($use_old_bios_files, $machine_type) = qemu_use_old_bios_files($machine_type);
+ if ($machine_conf->{viommu} && (!$kvm || !$q35)) {
+ die "to use vIOMMU please enable kvm and set the machine type to q35";
+ }
+
+ if ($machine_conf->{viommu}) {
+ push @$devices, '-device', 'intel-iommu,intremap=on,caching-mode=on';
+ }
+
push @$cmd, $kvm_binary;
push @$cmd, '-id', $vmid;
@@ -4068,6 +4114,10 @@ sub config_to_command {
}
push @$machineFlags, "type=${machine_type_min}";
+ if ($machine_conf->{viommu}) {
+ push @$machineFlags, 'kernel-irqchip=split';
+ }
+
push @$cmd, @$devices;
push @$cmd, '-rtc', join(',', @$rtcFlags) if scalar(@$rtcFlags);
push @$cmd, '-machine', join(',', @$machineFlags) if scalar(@$machineFlags);
diff --git a/PVE/QemuServer/Machine.pm b/PVE/QemuServer/Machine.pm
index d9429ed..33f9a64 100644
--- a/PVE/QemuServer/Machine.pm
+++ b/PVE/QemuServer/Machine.pm
@@ -15,7 +15,8 @@ our $PVE_MACHINE_VERSION = {
sub machine_type_is_q35 {
my ($conf) = @_;
- return $conf->{machine} && ($conf->{machine} =~ m/q35/) ? 1 : 0;
+ my $machine_conf = PVE::QemuServer::parse_machine($conf->{machine});
+ return $machine_conf->{type} && ($machine_conf->{type} =~ m/q35/) ? 1 : 0;
}
sub current_from_query_machines {
@@ -120,7 +121,8 @@ sub qemu_machine_pxe {
my $machine = get_current_qemu_machine($vmid);
- if ($conf->{machine} && $conf->{machine} =~ m/\.pxe$/) {
+ my $machine_conf = PVE::QemuServer::parse_machine($conf->{machine});
+ if ($conf->{machine} && $machine_conf->{type} =~ m/\.pxe$/) {
$machine .= '.pxe';
}
--
2.30.2
^ permalink raw reply [flat|nested] 9+ messages in thread
* [pve-devel] [PATCH qemu-server] added test-cases for new machine-syntax & viommu
2022-05-03 11:18 [pve-devel] [PATCH qemu-server 1/3] tests: replaced somemachine&someothermachine with q35&pc Markus Frank
2022-05-03 11:18 ` [pve-devel] [PATCH qemu-server] fix #3784: Parameter for guest vIOMMU & machine as property-string Markus Frank
@ 2022-05-03 11:19 ` Markus Frank
2022-05-03 11:19 ` [pve-devel] [PATCH manager] ui: MachineEdit with viommu checkbox Markus Frank
` (2 subsequent siblings)
4 siblings, 0 replies; 9+ messages in thread
From: Markus Frank @ 2022-05-03 11:19 UTC (permalink / raw)
To: pve-devel
added a few test-cases to test the new machine parameter with viommu
Signed-off-by: Markus Frank <m.frank@proxmox.com>
---
test/restore-config-expected/401.conf | 14 +++++
test/restore-config-expected/402.conf | 14 +++++
test/restore-config-input/401.conf | 14 +++++
test/restore-config-input/402.conf | 14 +++++
test/run_qemu_restore_config_tests.pl | 2 +-
.../create/qemu-server/401.conf | 32 +++++++++++
.../create/qemu-server/402.conf | 53 +++++++++++++++++++
.../create/qemu-server/401.conf | 14 +++++
.../create/qemu-server/402.conf | 33 ++++++++++++
test/snapshot-test.pm | 8 ++-
10 files changed, 196 insertions(+), 2 deletions(-)
create mode 100644 test/restore-config-expected/401.conf
create mode 100644 test/restore-config-expected/402.conf
create mode 100644 test/restore-config-input/401.conf
create mode 100644 test/restore-config-input/402.conf
create mode 100644 test/snapshot-expected/create/qemu-server/401.conf
create mode 100644 test/snapshot-expected/create/qemu-server/402.conf
create mode 100644 test/snapshot-input/create/qemu-server/401.conf
create mode 100644 test/snapshot-input/create/qemu-server/402.conf
diff --git a/test/restore-config-expected/401.conf b/test/restore-config-expected/401.conf
new file mode 100644
index 0000000..9400351
--- /dev/null
+++ b/test/restore-config-expected/401.conf
@@ -0,0 +1,14 @@
+bootdisk: scsi0
+cores: 1
+ide2: none,media=cdrom
+memory: 512
+machine: q35,viommu=1
+name: apache
+net0: virtio=92:38:11:FD:ED:87,bridge=vmbr0,firewall=1
+numa: 0
+ostype: l26
+scsi0: target:401/vm-401-disk-0.qcow2,size=4G
+scsihw: virtio-scsi-pci
+smbios1: uuid=ddf91b3f-a597-42be-9a7e-fb6421dcd5cd
+sockets: 1
+vmgenid: 0
diff --git a/test/restore-config-expected/402.conf b/test/restore-config-expected/402.conf
new file mode 100644
index 0000000..73f69cb
--- /dev/null
+++ b/test/restore-config-expected/402.conf
@@ -0,0 +1,14 @@
+bootdisk: scsi0
+cores: 1
+ide2: none,media=cdrom
+memory: 512
+machine: type=q35,viommu=1
+name: apache
+net0: virtio=92:38:11:FD:ED:87,bridge=vmbr0,firewall=1
+numa: 0
+ostype: l26
+scsi0: target:401/vm-402-disk-0.qcow2,size=4G
+scsihw: virtio-scsi-pci
+smbios1: uuid=ddf91b3f-a597-42be-9a7e-fb6421dcd5cd
+sockets: 1
+vmgenid: 0
diff --git a/test/restore-config-input/401.conf b/test/restore-config-input/401.conf
new file mode 100644
index 0000000..9400351
--- /dev/null
+++ b/test/restore-config-input/401.conf
@@ -0,0 +1,14 @@
+bootdisk: scsi0
+cores: 1
+ide2: none,media=cdrom
+memory: 512
+machine: q35,viommu=1
+name: apache
+net0: virtio=92:38:11:FD:ED:87,bridge=vmbr0,firewall=1
+numa: 0
+ostype: l26
+scsi0: target:401/vm-401-disk-0.qcow2,size=4G
+scsihw: virtio-scsi-pci
+smbios1: uuid=ddf91b3f-a597-42be-9a7e-fb6421dcd5cd
+sockets: 1
+vmgenid: 0
diff --git a/test/restore-config-input/402.conf b/test/restore-config-input/402.conf
new file mode 100644
index 0000000..73f69cb
--- /dev/null
+++ b/test/restore-config-input/402.conf
@@ -0,0 +1,14 @@
+bootdisk: scsi0
+cores: 1
+ide2: none,media=cdrom
+memory: 512
+machine: type=q35,viommu=1
+name: apache
+net0: virtio=92:38:11:FD:ED:87,bridge=vmbr0,firewall=1
+numa: 0
+ostype: l26
+scsi0: target:401/vm-402-disk-0.qcow2,size=4G
+scsihw: virtio-scsi-pci
+smbios1: uuid=ddf91b3f-a597-42be-9a7e-fb6421dcd5cd
+sockets: 1
+vmgenid: 0
diff --git a/test/run_qemu_restore_config_tests.pl b/test/run_qemu_restore_config_tests.pl
index 1e1e807..2221abe 100755
--- a/test/run_qemu_restore_config_tests.pl
+++ b/test/run_qemu_restore_config_tests.pl
@@ -25,7 +25,7 @@ $pve_cluster_module->mock(
);
# NOTE update when you add/remove tests
-plan tests => 4;
+plan tests => 6;
my $cfs_mock = Test::MockModule->new("PVE::Cluster");
$cfs_mock->mock(
diff --git a/test/snapshot-expected/create/qemu-server/401.conf b/test/snapshot-expected/create/qemu-server/401.conf
new file mode 100644
index 0000000..56cb71c
--- /dev/null
+++ b/test/snapshot-expected/create/qemu-server/401.conf
@@ -0,0 +1,32 @@
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+machine: q35,viommu=1
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
+
+[test]
+#test comment
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+machine: q35,viommu=1
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
diff --git a/test/snapshot-expected/create/qemu-server/402.conf b/test/snapshot-expected/create/qemu-server/402.conf
new file mode 100644
index 0000000..ac485ce
--- /dev/null
+++ b/test/snapshot-expected/create/qemu-server/402.conf
@@ -0,0 +1,53 @@
+agent: 1
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test2
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
+
+[test]
+#test comment
+agent: 1
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+machine: q35,viommu=1
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+vmstate: somestorage:state-volume
+
+[test2]
+#test comment
+agent: 1
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+runningmachine: q35
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+vmstate: somestorage:state-volume
diff --git a/test/snapshot-input/create/qemu-server/401.conf b/test/snapshot-input/create/qemu-server/401.conf
new file mode 100644
index 0000000..8feec27
--- /dev/null
+++ b/test/snapshot-input/create/qemu-server/401.conf
@@ -0,0 +1,14 @@
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+machine: q35,viommu=1
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
diff --git a/test/snapshot-input/create/qemu-server/402.conf b/test/snapshot-input/create/qemu-server/402.conf
new file mode 100644
index 0000000..72f89ce
--- /dev/null
+++ b/test/snapshot-input/create/qemu-server/402.conf
@@ -0,0 +1,33 @@
+agent: 1
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
+
+[test]
+#test comment
+agent: 1
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+machine: q35,viommu=1
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+vmstate: somestorage:state-volume
diff --git a/test/snapshot-test.pm b/test/snapshot-test.pm
index 3f1ac7c..3fcb0eb 100644
--- a/test/snapshot-test.pm
+++ b/test/snapshot-test.pm
@@ -305,7 +305,7 @@ sub __snapshot_save_vmstate {
my $snap = $conf->{snapshots}->{$snapname};
$snap->{vmstate} = "somestorage:state-volume";
- $snap->{runningmachine} = "somemachine"
+ $snap->{runningmachine} = "q35"
}
sub assert_config_exists_on_node {
@@ -566,6 +566,12 @@ $vm_mon->{savevm_start} = 1;
printf("Successful snapshot_create with no existing snapshots but set machine type\n");
testcase_create("301", "test", 1, "test comment", "", { "local:snapshotable-disk-1" => "test" });
+printf("Successful snapshot_create with viommu enabled\n");
+testcase_create("401", "test", 0, "test comment", "", { "local:snapshotable-disk-1" => "test" });
+
+printf("Successful snapshot_create with viommu enabled and with one existing snapshots including vmstate\n");
+testcase_create("402", "test2", 1, "test comment", "", { "local:snapshotable-disk-1" => "test2" });
+
$activate_storage_possible = 0;
printf("Expected error for snapshot_create when storage activation is not possible\n");
--
2.30.2
^ permalink raw reply [flat|nested] 9+ messages in thread
* [pve-devel] [PATCH manager] ui: MachineEdit with viommu checkbox
2022-05-03 11:18 [pve-devel] [PATCH qemu-server 1/3] tests: replaced somemachine&someothermachine with q35&pc Markus Frank
2022-05-03 11:18 ` [pve-devel] [PATCH qemu-server] fix #3784: Parameter for guest vIOMMU & machine as property-string Markus Frank
2022-05-03 11:19 ` [pve-devel] [PATCH qemu-server] added test-cases for new machine-syntax & viommu Markus Frank
@ 2022-05-03 11:19 ` Markus Frank
2022-05-04 7:57 ` [pve-devel] [PATCH qemu-server 1/3] tests: replaced somemachine&someothermachine with q35&pc Markus Frank
2022-05-05 11:08 ` Daniel Tschlatscher
4 siblings, 0 replies; 9+ messages in thread
From: Markus Frank @ 2022-05-03 11:19 UTC (permalink / raw)
To: pve-devel
Added a Checkbox to enable viommu, if q35 is selected.
Otherwise (i440fx) the checkbox is disabled.
The GUI also needs to parse the new machine parameter as PropertyString.
Signed-off-by: Markus Frank <m.frank@proxmox.com>
---
www/manager6/qemu/MachineEdit.js | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/www/manager6/qemu/MachineEdit.js b/www/manager6/qemu/MachineEdit.js
index f928c80c..41c4dd93 100644
--- a/www/manager6/qemu/MachineEdit.js
+++ b/www/manager6/qemu/MachineEdit.js
@@ -17,6 +17,13 @@ Ext.define('PVE.qemu.MachineInputPanel', {
let type = value === 'q35' ? 'q35' : 'i440fx';
store.clearFilter();
store.addFilter(val => val.data.id === 'latest' || val.data.type === type);
+ let viommuButton = me.lookup('viommu');
+ if (type === 'i440fx') {
+ viommuButton.setValue(false);
+ viommuButton.setDisabled(true);
+ } else {
+ viommuButton.setDisabled(false);
+ }
if (!me.getView().isWindows) {
version.setValue('latest');
} else {
@@ -40,12 +47,17 @@ Ext.define('PVE.qemu.MachineInputPanel', {
delete values.delete;
}
delete values.version;
+ if (values.viommu) values.machine += ",viommu=1";
+ delete values.viommu;
return values;
},
setValues: function(values) {
let me = this;
+ let machine_conf = PVE.Parser.parsePropertyString(values.machine, "type");
+ values.machine = machine_conf.type;
+
me.isWindows = values.isWindows;
if (values.machine === 'pc') {
values.machine = '__default__';
@@ -54,10 +66,14 @@ Ext.define('PVE.qemu.MachineInputPanel', {
if (me.isWindows) {
if (values.machine === '__default__') {
values.version = 'pc-i440fx-5.1';
+ values.viommu = false;
} else if (values.machine === 'q35') {
values.version = 'pc-q35-5.1';
}
}
+
+ values.viommu = machine_conf.viommu === "1";
+
if (values.machine !== '__default__' && values.machine !== 'q35') {
values.version = values.machine;
values.machine = values.version.match(/q35/) ? 'q35' : '__default__';
@@ -108,6 +124,12 @@ Ext.define('PVE.qemu.MachineInputPanel', {
},
},
},
+ {
+ xtype: 'proxmoxcheckbox',
+ fieldLabel: gettext('vIOMMU'),
+ name: 'viommu',
+ reference: 'viommu',
+ },
{
xtype: 'displayfield',
fieldLabel: gettext('Note'),
--
2.30.2
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [pve-devel] [PATCH qemu-server 1/3] tests: replaced somemachine&someothermachine with q35&pc
2022-05-03 11:18 [pve-devel] [PATCH qemu-server 1/3] tests: replaced somemachine&someothermachine with q35&pc Markus Frank
` (2 preceding siblings ...)
2022-05-03 11:19 ` [pve-devel] [PATCH manager] ui: MachineEdit with viommu checkbox Markus Frank
@ 2022-05-04 7:57 ` Markus Frank
2022-05-05 11:08 ` Daniel Tschlatscher
4 siblings, 0 replies; 9+ messages in thread
From: Markus Frank @ 2022-05-04 7:57 UTC (permalink / raw)
To: pve-devel
Info because I forgot to write 2/3 and 3/3:
These 4 patches belong together.
1: [PATCH qemu-server 1/3] tests: replaced somemachine&someothermachine
with q35&pc
2: [PATCH qemu-server] fix #3784: Parameter for guest vIOMMU & machine
as property-string
3: [PATCH qemu-server] added test-cases for new machine-syntax & viommu
4: [PATCH manager] ui: MachineEdit with viommu checkbox
On 5/3/22 13:18, Markus Frank wrote:
> Needed for new machine parameter, because parse_property_string checks
> the parameter with the regex-pattern and therefore the test-cases with
> somemachine & someothermachine always fail.
>
> Since they do not have a special meaning,
> I changed somemachine & someothermachine to q35 & pc with sed
>
> sed -i 's/somemachine/q35/g'
> sed -i 's/someothermachine/pc/g'
>
> Signed-off-by: Markus Frank <m.frank@proxmox.com>
> ---
> test/snapshot-expected/commit/qemu-server/101.conf | 2 +-
> test/snapshot-expected/commit/qemu-server/102.conf | 2 +-
> test/snapshot-expected/commit/qemu-server/201.conf | 2 +-
> test/snapshot-expected/commit/qemu-server/202.conf | 2 +-
> test/snapshot-expected/commit/qemu-server/203.conf | 2 +-
> test/snapshot-expected/create/qemu-server/102.conf | 2 +-
> test/snapshot-expected/create/qemu-server/104.conf | 4 ++--
> test/snapshot-expected/create/qemu-server/106.conf | 2 +-
> test/snapshot-expected/create/qemu-server/301.conf | 2 +-
> test/snapshot-expected/create/qemu-server/302.conf | 2 +-
> test/snapshot-expected/delete/qemu-server/203.conf | 2 +-
> test/snapshot-expected/delete/qemu-server/204.conf | 2 +-
> test/snapshot-expected/prepare/qemu-server/102.conf | 2 +-
> test/snapshot-expected/prepare/qemu-server/104.conf | 2 +-
> test/snapshot-expected/rollback/qemu-server/101.conf | 2 +-
> test/snapshot-expected/rollback/qemu-server/106.conf | 4 ++--
> test/snapshot-expected/rollback/qemu-server/201.conf | 2 +-
> test/snapshot-expected/rollback/qemu-server/202.conf | 2 +-
> test/snapshot-expected/rollback/qemu-server/203.conf | 2 +-
> test/snapshot-expected/rollback/qemu-server/204.conf | 2 +-
> test/snapshot-expected/rollback/qemu-server/205.conf | 2 +-
> test/snapshot-expected/rollback/qemu-server/301.conf | 2 +-
> test/snapshot-expected/rollback/qemu-server/302.conf | 2 +-
> test/snapshot-expected/rollback/qemu-server/303.conf | 2 +-
> test/snapshot-input/commit/qemu-server/101.conf | 2 +-
> test/snapshot-input/commit/qemu-server/102.conf | 2 +-
> test/snapshot-input/commit/qemu-server/201.conf | 2 +-
> test/snapshot-input/commit/qemu-server/202.conf | 2 +-
> test/snapshot-input/commit/qemu-server/203.conf | 2 +-
> test/snapshot-input/create/qemu-server/104.conf | 2 +-
> test/snapshot-input/delete/qemu-server/101.conf | 2 +-
> test/snapshot-input/delete/qemu-server/203.conf | 2 +-
> test/snapshot-input/delete/qemu-server/204.conf | 2 +-
> test/snapshot-input/rollback/qemu-server/101.conf | 2 +-
> test/snapshot-input/rollback/qemu-server/102.conf | 2 +-
> test/snapshot-input/rollback/qemu-server/103.conf | 2 +-
> test/snapshot-input/rollback/qemu-server/104.conf | 2 +-
> test/snapshot-input/rollback/qemu-server/106.conf | 4 ++--
> test/snapshot-input/rollback/qemu-server/201.conf | 2 +-
> test/snapshot-input/rollback/qemu-server/202.conf | 2 +-
> test/snapshot-input/rollback/qemu-server/203.conf | 2 +-
> test/snapshot-input/rollback/qemu-server/204.conf | 2 +-
> test/snapshot-input/rollback/qemu-server/205.conf | 2 +-
> test/snapshot-input/rollback/qemu-server/301.conf | 2 +-
> test/snapshot-input/rollback/qemu-server/302.conf | 2 +-
> test/snapshot-input/rollback/qemu-server/303.conf | 2 +-
> 46 files changed, 49 insertions(+), 49 deletions(-)
>
> diff --git a/test/snapshot-expected/commit/qemu-server/101.conf b/test/snapshot-expected/commit/qemu-server/101.conf
> index 060676e..82c9522 100644
> --- a/test/snapshot-expected/commit/qemu-server/101.conf
> +++ b/test/snapshot-expected/commit/qemu-server/101.conf
> @@ -18,7 +18,7 @@ bootdisk: ide0
> cores: 4
> ide0: somestore:somedisk,discard=on,size=32G
> ide2: none,media=cdrom
> -machine: somemachine
> +machine: q35
> memory: 8192
> name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> diff --git a/test/snapshot-expected/commit/qemu-server/102.conf b/test/snapshot-expected/commit/qemu-server/102.conf
> index 13f33a3..01b8531 100644
> --- a/test/snapshot-expected/commit/qemu-server/102.conf
> +++ b/test/snapshot-expected/commit/qemu-server/102.conf
> @@ -34,7 +34,7 @@ bootdisk: ide0
> cores: 4
> ide0: somestore:somedisk,discard=on,size=32G
> ide2: none,media=cdrom
> -machine: somemachine
> +machine: q35
> memory: 8192
> name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> diff --git a/test/snapshot-expected/commit/qemu-server/201.conf b/test/snapshot-expected/commit/qemu-server/201.conf
> index 63a6d77..f8e99dd 100644
> --- a/test/snapshot-expected/commit/qemu-server/201.conf
> +++ b/test/snapshot-expected/commit/qemu-server/201.conf
> @@ -34,7 +34,7 @@ bootdisk: ide0
> cores: 4
> ide0: somestore:somedisk,discard=on,size=32G
> ide2: none,media=cdrom
> -machine: somemachine
> +machine: q35
> memory: 8192
> name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> diff --git a/test/snapshot-expected/commit/qemu-server/202.conf b/test/snapshot-expected/commit/qemu-server/202.conf
> index 4c6b84d..a221ba0 100644
> --- a/test/snapshot-expected/commit/qemu-server/202.conf
> +++ b/test/snapshot-expected/commit/qemu-server/202.conf
> @@ -35,7 +35,7 @@ bootdisk: ide0
> cores: 4
> ide0: somestore:somedisk,discard=on,size=32G
> ide2: none,media=cdrom
> -machine: somemachine
> +machine: q35
> memory: 8192
> name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> diff --git a/test/snapshot-expected/commit/qemu-server/203.conf b/test/snapshot-expected/commit/qemu-server/203.conf
> index 5acf20d..e10b68e 100644
> --- a/test/snapshot-expected/commit/qemu-server/203.conf
> +++ b/test/snapshot-expected/commit/qemu-server/203.conf
> @@ -35,7 +35,7 @@ bootdisk: ide0
> cores: 4
> ide0: somestore:somedisk,discard=on,size=32G
> ide2: none,media=cdrom
> -machine: somemachine
> +machine: q35
> memory: 8192
> name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> diff --git a/test/snapshot-expected/create/qemu-server/102.conf b/test/snapshot-expected/create/qemu-server/102.conf
> index 9b57004..d507956 100644
> --- a/test/snapshot-expected/create/qemu-server/102.conf
> +++ b/test/snapshot-expected/create/qemu-server/102.conf
> @@ -25,7 +25,7 @@ name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> numa: 0
> ostype: win7
> -runningmachine: somemachine
> +runningmachine: q35
> smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
> snaptime: 1234567890
> sockets: 1
> diff --git a/test/snapshot-expected/create/qemu-server/104.conf b/test/snapshot-expected/create/qemu-server/104.conf
> index 54f1c21..385625f 100644
> --- a/test/snapshot-expected/create/qemu-server/104.conf
> +++ b/test/snapshot-expected/create/qemu-server/104.conf
> @@ -20,7 +20,7 @@ bootdisk: ide0
> cores: 4
> ide0: local:snapshotable-disk-1,discard=on,size=32G
> ide2: none,media=cdrom
> -machine: somemachine
> +machine: q35
> memory: 8192
> name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> @@ -45,7 +45,7 @@ net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> numa: 0
> ostype: win7
> parent: test
> -runningmachine: somemachine
> +runningmachine: q35
> smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
> snaptime: 1234567890
> sockets: 1
> diff --git a/test/snapshot-expected/create/qemu-server/106.conf b/test/snapshot-expected/create/qemu-server/106.conf
> index 9b57004..d507956 100644
> --- a/test/snapshot-expected/create/qemu-server/106.conf
> +++ b/test/snapshot-expected/create/qemu-server/106.conf
> @@ -25,7 +25,7 @@ name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> numa: 0
> ostype: win7
> -runningmachine: somemachine
> +runningmachine: q35
> smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
> snaptime: 1234567890
> sockets: 1
> diff --git a/test/snapshot-expected/create/qemu-server/301.conf b/test/snapshot-expected/create/qemu-server/301.conf
> index 9c49b1d..8cba2dc 100644
> --- a/test/snapshot-expected/create/qemu-server/301.conf
> +++ b/test/snapshot-expected/create/qemu-server/301.conf
> @@ -25,7 +25,7 @@ name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> numa: 0
> ostype: win7
> -runningmachine: somemachine
> +runningmachine: q35
> smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
> snaptime: 1234567890
> sockets: 1
> diff --git a/test/snapshot-expected/create/qemu-server/302.conf b/test/snapshot-expected/create/qemu-server/302.conf
> index 9c49b1d..8cba2dc 100644
> --- a/test/snapshot-expected/create/qemu-server/302.conf
> +++ b/test/snapshot-expected/create/qemu-server/302.conf
> @@ -25,7 +25,7 @@ name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> numa: 0
> ostype: win7
> -runningmachine: somemachine
> +runningmachine: q35
> smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
> snaptime: 1234567890
> sockets: 1
> diff --git a/test/snapshot-expected/delete/qemu-server/203.conf b/test/snapshot-expected/delete/qemu-server/203.conf
> index c406640..ed93cf7 100644
> --- a/test/snapshot-expected/delete/qemu-server/203.conf
> +++ b/test/snapshot-expected/delete/qemu-server/203.conf
> @@ -21,7 +21,7 @@ bootdisk: ide0
> cores: 4
> ide0: local:snapshotable-disk-1,discard=on,size=32G
> ide2: none,media=cdrom
> -machine: somemachine
> +machine: q35
> memory: 8192
> name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> diff --git a/test/snapshot-expected/delete/qemu-server/204.conf b/test/snapshot-expected/delete/qemu-server/204.conf
> index c521154..fe63204 100644
> --- a/test/snapshot-expected/delete/qemu-server/204.conf
> +++ b/test/snapshot-expected/delete/qemu-server/204.conf
> @@ -20,7 +20,7 @@ bootdisk: ide0
> cores: 4
> ide0: local:snapshotable-disk-1,discard=on,size=32G
> ide2: none,media=cdrom
> -machine: somemachine
> +machine: q35
> memory: 8192
> name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> diff --git a/test/snapshot-expected/prepare/qemu-server/102.conf b/test/snapshot-expected/prepare/qemu-server/102.conf
> index 92db74a..8f998ca 100644
> --- a/test/snapshot-expected/prepare/qemu-server/102.conf
> +++ b/test/snapshot-expected/prepare/qemu-server/102.conf
> @@ -23,7 +23,7 @@ name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> numa: 0
> ostype: win7
> -runningmachine: somemachine
> +runningmachine: q35
> smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
> snapstate: prepare
> snaptime: 1234567890
> diff --git a/test/snapshot-expected/prepare/qemu-server/104.conf b/test/snapshot-expected/prepare/qemu-server/104.conf
> index 02e2d3c..2f2ec96 100644
> --- a/test/snapshot-expected/prepare/qemu-server/104.conf
> +++ b/test/snapshot-expected/prepare/qemu-server/104.conf
> @@ -41,7 +41,7 @@ net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> numa: 0
> ostype: win7
> parent: test
> -runningmachine: somemachine
> +runningmachine: q35
> smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
> snapstate: prepare
> snaptime: 1234567890
> diff --git a/test/snapshot-expected/rollback/qemu-server/101.conf b/test/snapshot-expected/rollback/qemu-server/101.conf
> index 91de880..17257e3 100644
> --- a/test/snapshot-expected/rollback/qemu-server/101.conf
> +++ b/test/snapshot-expected/rollback/qemu-server/101.conf
> @@ -21,7 +21,7 @@ bootdisk: ide0
> cores: 4
> ide0: local:snapshotable-disk-1,discard=on,size=32G
> ide2: none,media=cdrom
> -machine: somemachine
> +machine: q35
> memory: 8192
> name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> diff --git a/test/snapshot-expected/rollback/qemu-server/106.conf b/test/snapshot-expected/rollback/qemu-server/106.conf
> index aa5fa9e..729bc93 100644
> --- a/test/snapshot-expected/rollback/qemu-server/106.conf
> +++ b/test/snapshot-expected/rollback/qemu-server/106.conf
> @@ -3,7 +3,7 @@ bootdisk: ide0
> cores: 4
> ide0: local:snapshotable-disk-1,discard=on,size=32G
> ide2: none,media=cdrom
> -machine: somemachine
> +machine: q35
> memory: 8192
> name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> @@ -21,7 +21,7 @@ bootdisk: ide0
> cores: 4
> ide0: local:snapshotable-disk-1,discard=on,size=32G
> ide2: none,media=cdrom
> -machine: somemachine
> +machine: q35
> memory: 8192
> name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> diff --git a/test/snapshot-expected/rollback/qemu-server/201.conf b/test/snapshot-expected/rollback/qemu-server/201.conf
> index c521154..fe63204 100644
> --- a/test/snapshot-expected/rollback/qemu-server/201.conf
> +++ b/test/snapshot-expected/rollback/qemu-server/201.conf
> @@ -20,7 +20,7 @@ bootdisk: ide0
> cores: 4
> ide0: local:snapshotable-disk-1,discard=on,size=32G
> ide2: none,media=cdrom
> -machine: somemachine
> +machine: q35
> memory: 8192
> name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> diff --git a/test/snapshot-expected/rollback/qemu-server/202.conf b/test/snapshot-expected/rollback/qemu-server/202.conf
> index 691f5a2..d09b5d0 100644
> --- a/test/snapshot-expected/rollback/qemu-server/202.conf
> +++ b/test/snapshot-expected/rollback/qemu-server/202.conf
> @@ -20,7 +20,7 @@ bootdisk: ide0
> cores: 4
> ide0: local:unsnapshotable-disk-1,discard=on,size=32G
> ide2: none,media=cdrom
> -machine: somemachine
> +machine: q35
> memory: 8192
> name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> diff --git a/test/snapshot-expected/rollback/qemu-server/203.conf b/test/snapshot-expected/rollback/qemu-server/203.conf
> index 6e53b27..8abf841 100644
> --- a/test/snapshot-expected/rollback/qemu-server/203.conf
> +++ b/test/snapshot-expected/rollback/qemu-server/203.conf
> @@ -20,7 +20,7 @@ bootdisk: ide0
> cores: 4
> ide0: local:snapshotable-disk-1,discard=on,size=32G
> ide2: none,media=cdrom
> -machine: somemachine
> +machine: q35
> memory: 8192
> name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> diff --git a/test/snapshot-expected/rollback/qemu-server/204.conf b/test/snapshot-expected/rollback/qemu-server/204.conf
> index c406640..ed93cf7 100644
> --- a/test/snapshot-expected/rollback/qemu-server/204.conf
> +++ b/test/snapshot-expected/rollback/qemu-server/204.conf
> @@ -21,7 +21,7 @@ bootdisk: ide0
> cores: 4
> ide0: local:snapshotable-disk-1,discard=on,size=32G
> ide2: none,media=cdrom
> -machine: somemachine
> +machine: q35
> memory: 8192
> name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> diff --git a/test/snapshot-expected/rollback/qemu-server/205.conf b/test/snapshot-expected/rollback/qemu-server/205.conf
> index c521154..fe63204 100644
> --- a/test/snapshot-expected/rollback/qemu-server/205.conf
> +++ b/test/snapshot-expected/rollback/qemu-server/205.conf
> @@ -20,7 +20,7 @@ bootdisk: ide0
> cores: 4
> ide0: local:snapshotable-disk-1,discard=on,size=32G
> ide2: none,media=cdrom
> -machine: somemachine
> +machine: q35
> memory: 8192
> name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> diff --git a/test/snapshot-expected/rollback/qemu-server/301.conf b/test/snapshot-expected/rollback/qemu-server/301.conf
> index c521154..fe63204 100644
> --- a/test/snapshot-expected/rollback/qemu-server/301.conf
> +++ b/test/snapshot-expected/rollback/qemu-server/301.conf
> @@ -20,7 +20,7 @@ bootdisk: ide0
> cores: 4
> ide0: local:snapshotable-disk-1,discard=on,size=32G
> ide2: none,media=cdrom
> -machine: somemachine
> +machine: q35
> memory: 8192
> name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> diff --git a/test/snapshot-expected/rollback/qemu-server/302.conf b/test/snapshot-expected/rollback/qemu-server/302.conf
> index 828e8b0..5110016 100644
> --- a/test/snapshot-expected/rollback/qemu-server/302.conf
> +++ b/test/snapshot-expected/rollback/qemu-server/302.conf
> @@ -27,7 +27,7 @@ name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> numa: 0
> ostype: win7
> -runningmachine: somemachine
> +runningmachine: q35
> smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
> snaptime: 1234567890
> sockets: 1
> diff --git a/test/snapshot-expected/rollback/qemu-server/303.conf b/test/snapshot-expected/rollback/qemu-server/303.conf
> index 518c954..473a9a0 100644
> --- a/test/snapshot-expected/rollback/qemu-server/303.conf
> +++ b/test/snapshot-expected/rollback/qemu-server/303.conf
> @@ -26,7 +26,7 @@ name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> numa: 0
> ostype: win7
> -runningmachine: somemachine
> +runningmachine: q35
> smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
> snaptime: 1234567890
> sockets: 1
> diff --git a/test/snapshot-input/commit/qemu-server/101.conf b/test/snapshot-input/commit/qemu-server/101.conf
> index 4ab1787..92c1f6a 100644
> --- a/test/snapshot-input/commit/qemu-server/101.conf
> +++ b/test/snapshot-input/commit/qemu-server/101.conf
> @@ -18,7 +18,7 @@ bootdisk: ide0
> cores: 4
> ide0: somestore:somedisk,discard=on,size=32G
> ide2: none,media=cdrom
> -machine: somemachine
> +machine: q35
> memory: 8192
> name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> diff --git a/test/snapshot-input/commit/qemu-server/102.conf b/test/snapshot-input/commit/qemu-server/102.conf
> index b62f2c6..99bca5e 100644
> --- a/test/snapshot-input/commit/qemu-server/102.conf
> +++ b/test/snapshot-input/commit/qemu-server/102.conf
> @@ -35,7 +35,7 @@ bootdisk: ide0
> cores: 4
> ide0: somestore:somedisk,discard=on,size=32G
> ide2: none,media=cdrom
> -machine: somemachine
> +machine: q35
> memory: 8192
> name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> diff --git a/test/snapshot-input/commit/qemu-server/201.conf b/test/snapshot-input/commit/qemu-server/201.conf
> index 63a6d77..f8e99dd 100644
> --- a/test/snapshot-input/commit/qemu-server/201.conf
> +++ b/test/snapshot-input/commit/qemu-server/201.conf
> @@ -34,7 +34,7 @@ bootdisk: ide0
> cores: 4
> ide0: somestore:somedisk,discard=on,size=32G
> ide2: none,media=cdrom
> -machine: somemachine
> +machine: q35
> memory: 8192
> name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> diff --git a/test/snapshot-input/commit/qemu-server/202.conf b/test/snapshot-input/commit/qemu-server/202.conf
> index 4c6b84d..a221ba0 100644
> --- a/test/snapshot-input/commit/qemu-server/202.conf
> +++ b/test/snapshot-input/commit/qemu-server/202.conf
> @@ -35,7 +35,7 @@ bootdisk: ide0
> cores: 4
> ide0: somestore:somedisk,discard=on,size=32G
> ide2: none,media=cdrom
> -machine: somemachine
> +machine: q35
> memory: 8192
> name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> diff --git a/test/snapshot-input/commit/qemu-server/203.conf b/test/snapshot-input/commit/qemu-server/203.conf
> index 5acf20d..e10b68e 100644
> --- a/test/snapshot-input/commit/qemu-server/203.conf
> +++ b/test/snapshot-input/commit/qemu-server/203.conf
> @@ -35,7 +35,7 @@ bootdisk: ide0
> cores: 4
> ide0: somestore:somedisk,discard=on,size=32G
> ide2: none,media=cdrom
> -machine: somemachine
> +machine: q35
> memory: 8192
> name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> diff --git a/test/snapshot-input/create/qemu-server/104.conf b/test/snapshot-input/create/qemu-server/104.conf
> index c521154..fe63204 100644
> --- a/test/snapshot-input/create/qemu-server/104.conf
> +++ b/test/snapshot-input/create/qemu-server/104.conf
> @@ -20,7 +20,7 @@ bootdisk: ide0
> cores: 4
> ide0: local:snapshotable-disk-1,discard=on,size=32G
> ide2: none,media=cdrom
> -machine: somemachine
> +machine: q35
> memory: 8192
> name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> diff --git a/test/snapshot-input/delete/qemu-server/101.conf b/test/snapshot-input/delete/qemu-server/101.conf
> index c521154..fe63204 100644
> --- a/test/snapshot-input/delete/qemu-server/101.conf
> +++ b/test/snapshot-input/delete/qemu-server/101.conf
> @@ -20,7 +20,7 @@ bootdisk: ide0
> cores: 4
> ide0: local:snapshotable-disk-1,discard=on,size=32G
> ide2: none,media=cdrom
> -machine: somemachine
> +machine: q35
> memory: 8192
> name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> diff --git a/test/snapshot-input/delete/qemu-server/203.conf b/test/snapshot-input/delete/qemu-server/203.conf
> index c406640..ed93cf7 100644
> --- a/test/snapshot-input/delete/qemu-server/203.conf
> +++ b/test/snapshot-input/delete/qemu-server/203.conf
> @@ -21,7 +21,7 @@ bootdisk: ide0
> cores: 4
> ide0: local:snapshotable-disk-1,discard=on,size=32G
> ide2: none,media=cdrom
> -machine: somemachine
> +machine: q35
> memory: 8192
> name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> diff --git a/test/snapshot-input/delete/qemu-server/204.conf b/test/snapshot-input/delete/qemu-server/204.conf
> index c521154..fe63204 100644
> --- a/test/snapshot-input/delete/qemu-server/204.conf
> +++ b/test/snapshot-input/delete/qemu-server/204.conf
> @@ -20,7 +20,7 @@ bootdisk: ide0
> cores: 4
> ide0: local:snapshotable-disk-1,discard=on,size=32G
> ide2: none,media=cdrom
> -machine: somemachine
> +machine: q35
> memory: 8192
> name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> diff --git a/test/snapshot-input/rollback/qemu-server/101.conf b/test/snapshot-input/rollback/qemu-server/101.conf
> index 4fea865..0fa6a61 100644
> --- a/test/snapshot-input/rollback/qemu-server/101.conf
> +++ b/test/snapshot-input/rollback/qemu-server/101.conf
> @@ -20,7 +20,7 @@ bootdisk: ide0
> cores: 4
> ide0: local:snapshotable-disk-1,discard=on,size=32G
> ide2: none,media=cdrom
> -machine: somemachine
> +machine: q35
> memory: 8192
> name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> diff --git a/test/snapshot-input/rollback/qemu-server/102.conf b/test/snapshot-input/rollback/qemu-server/102.conf
> index 8f0db83..3fcffe1 100644
> --- a/test/snapshot-input/rollback/qemu-server/102.conf
> +++ b/test/snapshot-input/rollback/qemu-server/102.conf
> @@ -4,7 +4,7 @@ bootdisk: ide2
> cores: 2
> ide0: local:snapshotable-disk-1,size=32G
> ide2: none,media=cdrom
> -machine: someothermachine
> +machine: pc
> memory: 4096
> name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> diff --git a/test/snapshot-input/rollback/qemu-server/103.conf b/test/snapshot-input/rollback/qemu-server/103.conf
> index 8f0db83..3fcffe1 100644
> --- a/test/snapshot-input/rollback/qemu-server/103.conf
> +++ b/test/snapshot-input/rollback/qemu-server/103.conf
> @@ -4,7 +4,7 @@ bootdisk: ide2
> cores: 2
> ide0: local:snapshotable-disk-1,size=32G
> ide2: none,media=cdrom
> -machine: someothermachine
> +machine: pc
> memory: 4096
> name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> diff --git a/test/snapshot-input/rollback/qemu-server/104.conf b/test/snapshot-input/rollback/qemu-server/104.conf
> index ff50151..2f12761 100644
> --- a/test/snapshot-input/rollback/qemu-server/104.conf
> +++ b/test/snapshot-input/rollback/qemu-server/104.conf
> @@ -4,7 +4,7 @@ bootdisk: ide2
> cores: 2
> ide0: local:snapshotable-disk-1,size=32G
> ide2: none,media=cdrom
> -machine: someothermachine
> +machine: pc
> memory: 4096
> name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> diff --git a/test/snapshot-input/rollback/qemu-server/106.conf b/test/snapshot-input/rollback/qemu-server/106.conf
> index 64bf9bf..56d7199 100644
> --- a/test/snapshot-input/rollback/qemu-server/106.conf
> +++ b/test/snapshot-input/rollback/qemu-server/106.conf
> @@ -3,7 +3,7 @@ bootdisk: ide0
> cores: 4
> ide0: local:snapshotable-disk-1,discard=on,size=32G
> ide2: none,media=cdrom
> -machine: someothermachine
> +machine: pc
> memory: 8192
> name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> @@ -21,7 +21,7 @@ bootdisk: ide0
> cores: 4
> ide0: local:snapshotable-disk-1,discard=on,size=32G
> ide2: none,media=cdrom
> -machine: somemachine
> +machine: q35
> memory: 8192
> name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> diff --git a/test/snapshot-input/rollback/qemu-server/201.conf b/test/snapshot-input/rollback/qemu-server/201.conf
> index c521154..fe63204 100644
> --- a/test/snapshot-input/rollback/qemu-server/201.conf
> +++ b/test/snapshot-input/rollback/qemu-server/201.conf
> @@ -20,7 +20,7 @@ bootdisk: ide0
> cores: 4
> ide0: local:snapshotable-disk-1,discard=on,size=32G
> ide2: none,media=cdrom
> -machine: somemachine
> +machine: q35
> memory: 8192
> name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> diff --git a/test/snapshot-input/rollback/qemu-server/202.conf b/test/snapshot-input/rollback/qemu-server/202.conf
> index 691f5a2..d09b5d0 100644
> --- a/test/snapshot-input/rollback/qemu-server/202.conf
> +++ b/test/snapshot-input/rollback/qemu-server/202.conf
> @@ -20,7 +20,7 @@ bootdisk: ide0
> cores: 4
> ide0: local:unsnapshotable-disk-1,discard=on,size=32G
> ide2: none,media=cdrom
> -machine: somemachine
> +machine: q35
> memory: 8192
> name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> diff --git a/test/snapshot-input/rollback/qemu-server/203.conf b/test/snapshot-input/rollback/qemu-server/203.conf
> index 6e53b27..8abf841 100644
> --- a/test/snapshot-input/rollback/qemu-server/203.conf
> +++ b/test/snapshot-input/rollback/qemu-server/203.conf
> @@ -20,7 +20,7 @@ bootdisk: ide0
> cores: 4
> ide0: local:snapshotable-disk-1,discard=on,size=32G
> ide2: none,media=cdrom
> -machine: somemachine
> +machine: q35
> memory: 8192
> name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> diff --git a/test/snapshot-input/rollback/qemu-server/204.conf b/test/snapshot-input/rollback/qemu-server/204.conf
> index c406640..ed93cf7 100644
> --- a/test/snapshot-input/rollback/qemu-server/204.conf
> +++ b/test/snapshot-input/rollback/qemu-server/204.conf
> @@ -21,7 +21,7 @@ bootdisk: ide0
> cores: 4
> ide0: local:snapshotable-disk-1,discard=on,size=32G
> ide2: none,media=cdrom
> -machine: somemachine
> +machine: q35
> memory: 8192
> name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> diff --git a/test/snapshot-input/rollback/qemu-server/205.conf b/test/snapshot-input/rollback/qemu-server/205.conf
> index c521154..fe63204 100644
> --- a/test/snapshot-input/rollback/qemu-server/205.conf
> +++ b/test/snapshot-input/rollback/qemu-server/205.conf
> @@ -20,7 +20,7 @@ bootdisk: ide0
> cores: 4
> ide0: local:snapshotable-disk-1,discard=on,size=32G
> ide2: none,media=cdrom
> -machine: somemachine
> +machine: q35
> memory: 8192
> name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> diff --git a/test/snapshot-input/rollback/qemu-server/301.conf b/test/snapshot-input/rollback/qemu-server/301.conf
> index c521154..fe63204 100644
> --- a/test/snapshot-input/rollback/qemu-server/301.conf
> +++ b/test/snapshot-input/rollback/qemu-server/301.conf
> @@ -20,7 +20,7 @@ bootdisk: ide0
> cores: 4
> ide0: local:snapshotable-disk-1,discard=on,size=32G
> ide2: none,media=cdrom
> -machine: somemachine
> +machine: q35
> memory: 8192
> name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> diff --git a/test/snapshot-input/rollback/qemu-server/302.conf b/test/snapshot-input/rollback/qemu-server/302.conf
> index 518c954..473a9a0 100644
> --- a/test/snapshot-input/rollback/qemu-server/302.conf
> +++ b/test/snapshot-input/rollback/qemu-server/302.conf
> @@ -26,7 +26,7 @@ name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> numa: 0
> ostype: win7
> -runningmachine: somemachine
> +runningmachine: q35
> smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
> snaptime: 1234567890
> sockets: 1
> diff --git a/test/snapshot-input/rollback/qemu-server/303.conf b/test/snapshot-input/rollback/qemu-server/303.conf
> index 518c954..473a9a0 100644
> --- a/test/snapshot-input/rollback/qemu-server/303.conf
> +++ b/test/snapshot-input/rollback/qemu-server/303.conf
> @@ -26,7 +26,7 @@ name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> numa: 0
> ostype: win7
> -runningmachine: somemachine
> +runningmachine: q35
> smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
> snaptime: 1234567890
> sockets: 1
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [pve-devel] [PATCH qemu-server 1/3] tests: replaced somemachine&someothermachine with q35&pc
2022-05-03 11:18 [pve-devel] [PATCH qemu-server 1/3] tests: replaced somemachine&someothermachine with q35&pc Markus Frank
` (3 preceding siblings ...)
2022-05-04 7:57 ` [pve-devel] [PATCH qemu-server 1/3] tests: replaced somemachine&someothermachine with q35&pc Markus Frank
@ 2022-05-05 11:08 ` Daniel Tschlatscher
4 siblings, 0 replies; 9+ messages in thread
From: Daniel Tschlatscher @ 2022-05-05 11:08 UTC (permalink / raw)
To: pve-devel
Applied this patch locally + in a few virtualized VMs.
1. GUI: Tried to set a few different combinations of the q35 / i440fx
machine and vIOMMU checkbox setting. I couldn't find any problems or
bugs with the selection of these settings.
2. The vIOMMU settings applied correctly every time I used it. I set
up multiple nested Proxmox nodes, repeated passthrough of a device
worked very well.
I tested this by passing an unmounted NVME SSD device down the chain,
then formatting it in the last VM:
Host (mala)
-> Nested Proxmox 1
-> Nested Proxmox 2
-> Alpine 3.12 VM
Everything worked as advertised.
Tested-by: Daniel Tschlatscher <d.tschlatscher@proxmox.com>
On 5/3/22 13:18, Markus Frank wrote:
> Needed for new machine parameter, because parse_property_string checks
> the parameter with the regex-pattern and therefore the test-cases with
> somemachine & someothermachine always fail.
>
> Since they do not have a special meaning,
> I changed somemachine & someothermachine to q35 & pc with sed
>
> sed -i 's/somemachine/q35/g'
> sed -i 's/someothermachine/pc/g'
>
> Signed-off-by: Markus Frank<m.frank@proxmox.com>
> ---
> test/snapshot-expected/commit/qemu-server/101.conf | 2 +-
> test/snapshot-expected/commit/qemu-server/102.conf | 2 +-
> test/snapshot-expected/commit/qemu-server/201.conf | 2 +-
> test/snapshot-expected/commit/qemu-server/202.conf | 2 +-
> test/snapshot-expected/commit/qemu-server/203.conf | 2 +-
> test/snapshot-expected/create/qemu-server/102.conf | 2 +-
> test/snapshot-expected/create/qemu-server/104.conf | 4 ++--
> test/snapshot-expected/create/qemu-server/106.conf | 2 +-
> test/snapshot-expected/create/qemu-server/301.conf | 2 +-
> test/snapshot-expected/create/qemu-server/302.conf | 2 +-
> test/snapshot-expected/delete/qemu-server/203.conf | 2 +-
> test/snapshot-expected/delete/qemu-server/204.conf | 2 +-
> test/snapshot-expected/prepare/qemu-server/102.conf | 2 +-
> test/snapshot-expected/prepare/qemu-server/104.conf | 2 +-
> test/snapshot-expected/rollback/qemu-server/101.conf | 2 +-
> test/snapshot-expected/rollback/qemu-server/106.conf | 4 ++--
> test/snapshot-expected/rollback/qemu-server/201.conf | 2 +-
> test/snapshot-expected/rollback/qemu-server/202.conf | 2 +-
> test/snapshot-expected/rollback/qemu-server/203.conf | 2 +-
> test/snapshot-expected/rollback/qemu-server/204.conf | 2 +-
> test/snapshot-expected/rollback/qemu-server/205.conf | 2 +-
> test/snapshot-expected/rollback/qemu-server/301.conf | 2 +-
> test/snapshot-expected/rollback/qemu-server/302.conf | 2 +-
> test/snapshot-expected/rollback/qemu-server/303.conf | 2 +-
> test/snapshot-input/commit/qemu-server/101.conf | 2 +-
> test/snapshot-input/commit/qemu-server/102.conf | 2 +-
> test/snapshot-input/commit/qemu-server/201.conf | 2 +-
> test/snapshot-input/commit/qemu-server/202.conf | 2 +-
> test/snapshot-input/commit/qemu-server/203.conf | 2 +-
> test/snapshot-input/create/qemu-server/104.conf | 2 +-
> test/snapshot-input/delete/qemu-server/101.conf | 2 +-
> test/snapshot-input/delete/qemu-server/203.conf | 2 +-
> test/snapshot-input/delete/qemu-server/204.conf | 2 +-
> test/snapshot-input/rollback/qemu-server/101.conf | 2 +-
> test/snapshot-input/rollback/qemu-server/102.conf | 2 +-
> test/snapshot-input/rollback/qemu-server/103.conf | 2 +-
> test/snapshot-input/rollback/qemu-server/104.conf | 2 +-
> test/snapshot-input/rollback/qemu-server/106.conf | 4 ++--
> test/snapshot-input/rollback/qemu-server/201.conf | 2 +-
> test/snapshot-input/rollback/qemu-server/202.conf | 2 +-
> test/snapshot-input/rollback/qemu-server/203.conf | 2 +-
> test/snapshot-input/rollback/qemu-server/204.conf | 2 +-
> test/snapshot-input/rollback/qemu-server/205.conf | 2 +-
> test/snapshot-input/rollback/qemu-server/301.conf | 2 +-
> test/snapshot-input/rollback/qemu-server/302.conf | 2 +-
> test/snapshot-input/rollback/qemu-server/303.conf | 2 +-
> 46 files changed, 49 insertions(+), 49 deletions(-)
>
> diff --git a/test/snapshot-expected/commit/qemu-server/101.conf b/test/snapshot-expected/commit/qemu-server/101.conf
> index 060676e..82c9522 100644
> --- a/test/snapshot-expected/commit/qemu-server/101.conf
> +++ b/test/snapshot-expected/commit/qemu-server/101.conf
> @@ -18,7 +18,7 @@ bootdisk: ide0
> cores: 4
> ide0: somestore:somedisk,discard=on,size=32G
> ide2: none,media=cdrom
> -machine: somemachine
> +machine: q35
> memory: 8192
> name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> diff --git a/test/snapshot-expected/commit/qemu-server/102.conf b/test/snapshot-expected/commit/qemu-server/102.conf
> index 13f33a3..01b8531 100644
> --- a/test/snapshot-expected/commit/qemu-server/102.conf
> +++ b/test/snapshot-expected/commit/qemu-server/102.conf
> @@ -34,7 +34,7 @@ bootdisk: ide0
> cores: 4
> ide0: somestore:somedisk,discard=on,size=32G
> ide2: none,media=cdrom
> -machine: somemachine
> +machine: q35
> memory: 8192
> name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> diff --git a/test/snapshot-expected/commit/qemu-server/201.conf b/test/snapshot-expected/commit/qemu-server/201.conf
> index 63a6d77..f8e99dd 100644
> --- a/test/snapshot-expected/commit/qemu-server/201.conf
> +++ b/test/snapshot-expected/commit/qemu-server/201.conf
> @@ -34,7 +34,7 @@ bootdisk: ide0
> cores: 4
> ide0: somestore:somedisk,discard=on,size=32G
> ide2: none,media=cdrom
> -machine: somemachine
> +machine: q35
> memory: 8192
> name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> diff --git a/test/snapshot-expected/commit/qemu-server/202.conf b/test/snapshot-expected/commit/qemu-server/202.conf
> index 4c6b84d..a221ba0 100644
> --- a/test/snapshot-expected/commit/qemu-server/202.conf
> +++ b/test/snapshot-expected/commit/qemu-server/202.conf
> @@ -35,7 +35,7 @@ bootdisk: ide0
> cores: 4
> ide0: somestore:somedisk,discard=on,size=32G
> ide2: none,media=cdrom
> -machine: somemachine
> +machine: q35
> memory: 8192
> name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> diff --git a/test/snapshot-expected/commit/qemu-server/203.conf b/test/snapshot-expected/commit/qemu-server/203.conf
> index 5acf20d..e10b68e 100644
> --- a/test/snapshot-expected/commit/qemu-server/203.conf
> +++ b/test/snapshot-expected/commit/qemu-server/203.conf
> @@ -35,7 +35,7 @@ bootdisk: ide0
> cores: 4
> ide0: somestore:somedisk,discard=on,size=32G
> ide2: none,media=cdrom
> -machine: somemachine
> +machine: q35
> memory: 8192
> name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> diff --git a/test/snapshot-expected/create/qemu-server/102.conf b/test/snapshot-expected/create/qemu-server/102.conf
> index 9b57004..d507956 100644
> --- a/test/snapshot-expected/create/qemu-server/102.conf
> +++ b/test/snapshot-expected/create/qemu-server/102.conf
> @@ -25,7 +25,7 @@ name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> numa: 0
> ostype: win7
> -runningmachine: somemachine
> +runningmachine: q35
> smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
> snaptime: 1234567890
> sockets: 1
> diff --git a/test/snapshot-expected/create/qemu-server/104.conf b/test/snapshot-expected/create/qemu-server/104.conf
> index 54f1c21..385625f 100644
> --- a/test/snapshot-expected/create/qemu-server/104.conf
> +++ b/test/snapshot-expected/create/qemu-server/104.conf
> @@ -20,7 +20,7 @@ bootdisk: ide0
> cores: 4
> ide0: local:snapshotable-disk-1,discard=on,size=32G
> ide2: none,media=cdrom
> -machine: somemachine
> +machine: q35
> memory: 8192
> name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> @@ -45,7 +45,7 @@ net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> numa: 0
> ostype: win7
> parent: test
> -runningmachine: somemachine
> +runningmachine: q35
> smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
> snaptime: 1234567890
> sockets: 1
> diff --git a/test/snapshot-expected/create/qemu-server/106.conf b/test/snapshot-expected/create/qemu-server/106.conf
> index 9b57004..d507956 100644
> --- a/test/snapshot-expected/create/qemu-server/106.conf
> +++ b/test/snapshot-expected/create/qemu-server/106.conf
> @@ -25,7 +25,7 @@ name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> numa: 0
> ostype: win7
> -runningmachine: somemachine
> +runningmachine: q35
> smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
> snaptime: 1234567890
> sockets: 1
> diff --git a/test/snapshot-expected/create/qemu-server/301.conf b/test/snapshot-expected/create/qemu-server/301.conf
> index 9c49b1d..8cba2dc 100644
> --- a/test/snapshot-expected/create/qemu-server/301.conf
> +++ b/test/snapshot-expected/create/qemu-server/301.conf
> @@ -25,7 +25,7 @@ name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> numa: 0
> ostype: win7
> -runningmachine: somemachine
> +runningmachine: q35
> smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
> snaptime: 1234567890
> sockets: 1
> diff --git a/test/snapshot-expected/create/qemu-server/302.conf b/test/snapshot-expected/create/qemu-server/302.conf
> index 9c49b1d..8cba2dc 100644
> --- a/test/snapshot-expected/create/qemu-server/302.conf
> +++ b/test/snapshot-expected/create/qemu-server/302.conf
> @@ -25,7 +25,7 @@ name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> numa: 0
> ostype: win7
> -runningmachine: somemachine
> +runningmachine: q35
> smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
> snaptime: 1234567890
> sockets: 1
> diff --git a/test/snapshot-expected/delete/qemu-server/203.conf b/test/snapshot-expected/delete/qemu-server/203.conf
> index c406640..ed93cf7 100644
> --- a/test/snapshot-expected/delete/qemu-server/203.conf
> +++ b/test/snapshot-expected/delete/qemu-server/203.conf
> @@ -21,7 +21,7 @@ bootdisk: ide0
> cores: 4
> ide0: local:snapshotable-disk-1,discard=on,size=32G
> ide2: none,media=cdrom
> -machine: somemachine
> +machine: q35
> memory: 8192
> name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> diff --git a/test/snapshot-expected/delete/qemu-server/204.conf b/test/snapshot-expected/delete/qemu-server/204.conf
> index c521154..fe63204 100644
> --- a/test/snapshot-expected/delete/qemu-server/204.conf
> +++ b/test/snapshot-expected/delete/qemu-server/204.conf
> @@ -20,7 +20,7 @@ bootdisk: ide0
> cores: 4
> ide0: local:snapshotable-disk-1,discard=on,size=32G
> ide2: none,media=cdrom
> -machine: somemachine
> +machine: q35
> memory: 8192
> name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> diff --git a/test/snapshot-expected/prepare/qemu-server/102.conf b/test/snapshot-expected/prepare/qemu-server/102.conf
> index 92db74a..8f998ca 100644
> --- a/test/snapshot-expected/prepare/qemu-server/102.conf
> +++ b/test/snapshot-expected/prepare/qemu-server/102.conf
> @@ -23,7 +23,7 @@ name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> numa: 0
> ostype: win7
> -runningmachine: somemachine
> +runningmachine: q35
> smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
> snapstate: prepare
> snaptime: 1234567890
> diff --git a/test/snapshot-expected/prepare/qemu-server/104.conf b/test/snapshot-expected/prepare/qemu-server/104.conf
> index 02e2d3c..2f2ec96 100644
> --- a/test/snapshot-expected/prepare/qemu-server/104.conf
> +++ b/test/snapshot-expected/prepare/qemu-server/104.conf
> @@ -41,7 +41,7 @@ net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> numa: 0
> ostype: win7
> parent: test
> -runningmachine: somemachine
> +runningmachine: q35
> smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
> snapstate: prepare
> snaptime: 1234567890
> diff --git a/test/snapshot-expected/rollback/qemu-server/101.conf b/test/snapshot-expected/rollback/qemu-server/101.conf
> index 91de880..17257e3 100644
> --- a/test/snapshot-expected/rollback/qemu-server/101.conf
> +++ b/test/snapshot-expected/rollback/qemu-server/101.conf
> @@ -21,7 +21,7 @@ bootdisk: ide0
> cores: 4
> ide0: local:snapshotable-disk-1,discard=on,size=32G
> ide2: none,media=cdrom
> -machine: somemachine
> +machine: q35
> memory: 8192
> name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> diff --git a/test/snapshot-expected/rollback/qemu-server/106.conf b/test/snapshot-expected/rollback/qemu-server/106.conf
> index aa5fa9e..729bc93 100644
> --- a/test/snapshot-expected/rollback/qemu-server/106.conf
> +++ b/test/snapshot-expected/rollback/qemu-server/106.conf
> @@ -3,7 +3,7 @@ bootdisk: ide0
> cores: 4
> ide0: local:snapshotable-disk-1,discard=on,size=32G
> ide2: none,media=cdrom
> -machine: somemachine
> +machine: q35
> memory: 8192
> name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> @@ -21,7 +21,7 @@ bootdisk: ide0
> cores: 4
> ide0: local:snapshotable-disk-1,discard=on,size=32G
> ide2: none,media=cdrom
> -machine: somemachine
> +machine: q35
> memory: 8192
> name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> diff --git a/test/snapshot-expected/rollback/qemu-server/201.conf b/test/snapshot-expected/rollback/qemu-server/201.conf
> index c521154..fe63204 100644
> --- a/test/snapshot-expected/rollback/qemu-server/201.conf
> +++ b/test/snapshot-expected/rollback/qemu-server/201.conf
> @@ -20,7 +20,7 @@ bootdisk: ide0
> cores: 4
> ide0: local:snapshotable-disk-1,discard=on,size=32G
> ide2: none,media=cdrom
> -machine: somemachine
> +machine: q35
> memory: 8192
> name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> diff --git a/test/snapshot-expected/rollback/qemu-server/202.conf b/test/snapshot-expected/rollback/qemu-server/202.conf
> index 691f5a2..d09b5d0 100644
> --- a/test/snapshot-expected/rollback/qemu-server/202.conf
> +++ b/test/snapshot-expected/rollback/qemu-server/202.conf
> @@ -20,7 +20,7 @@ bootdisk: ide0
> cores: 4
> ide0: local:unsnapshotable-disk-1,discard=on,size=32G
> ide2: none,media=cdrom
> -machine: somemachine
> +machine: q35
> memory: 8192
> name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> diff --git a/test/snapshot-expected/rollback/qemu-server/203.conf b/test/snapshot-expected/rollback/qemu-server/203.conf
> index 6e53b27..8abf841 100644
> --- a/test/snapshot-expected/rollback/qemu-server/203.conf
> +++ b/test/snapshot-expected/rollback/qemu-server/203.conf
> @@ -20,7 +20,7 @@ bootdisk: ide0
> cores: 4
> ide0: local:snapshotable-disk-1,discard=on,size=32G
> ide2: none,media=cdrom
> -machine: somemachine
> +machine: q35
> memory: 8192
> name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> diff --git a/test/snapshot-expected/rollback/qemu-server/204.conf b/test/snapshot-expected/rollback/qemu-server/204.conf
> index c406640..ed93cf7 100644
> --- a/test/snapshot-expected/rollback/qemu-server/204.conf
> +++ b/test/snapshot-expected/rollback/qemu-server/204.conf
> @@ -21,7 +21,7 @@ bootdisk: ide0
> cores: 4
> ide0: local:snapshotable-disk-1,discard=on,size=32G
> ide2: none,media=cdrom
> -machine: somemachine
> +machine: q35
> memory: 8192
> name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> diff --git a/test/snapshot-expected/rollback/qemu-server/205.conf b/test/snapshot-expected/rollback/qemu-server/205.conf
> index c521154..fe63204 100644
> --- a/test/snapshot-expected/rollback/qemu-server/205.conf
> +++ b/test/snapshot-expected/rollback/qemu-server/205.conf
> @@ -20,7 +20,7 @@ bootdisk: ide0
> cores: 4
> ide0: local:snapshotable-disk-1,discard=on,size=32G
> ide2: none,media=cdrom
> -machine: somemachine
> +machine: q35
> memory: 8192
> name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> diff --git a/test/snapshot-expected/rollback/qemu-server/301.conf b/test/snapshot-expected/rollback/qemu-server/301.conf
> index c521154..fe63204 100644
> --- a/test/snapshot-expected/rollback/qemu-server/301.conf
> +++ b/test/snapshot-expected/rollback/qemu-server/301.conf
> @@ -20,7 +20,7 @@ bootdisk: ide0
> cores: 4
> ide0: local:snapshotable-disk-1,discard=on,size=32G
> ide2: none,media=cdrom
> -machine: somemachine
> +machine: q35
> memory: 8192
> name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> diff --git a/test/snapshot-expected/rollback/qemu-server/302.conf b/test/snapshot-expected/rollback/qemu-server/302.conf
> index 828e8b0..5110016 100644
> --- a/test/snapshot-expected/rollback/qemu-server/302.conf
> +++ b/test/snapshot-expected/rollback/qemu-server/302.conf
> @@ -27,7 +27,7 @@ name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> numa: 0
> ostype: win7
> -runningmachine: somemachine
> +runningmachine: q35
> smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
> snaptime: 1234567890
> sockets: 1
> diff --git a/test/snapshot-expected/rollback/qemu-server/303.conf b/test/snapshot-expected/rollback/qemu-server/303.conf
> index 518c954..473a9a0 100644
> --- a/test/snapshot-expected/rollback/qemu-server/303.conf
> +++ b/test/snapshot-expected/rollback/qemu-server/303.conf
> @@ -26,7 +26,7 @@ name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> numa: 0
> ostype: win7
> -runningmachine: somemachine
> +runningmachine: q35
> smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
> snaptime: 1234567890
> sockets: 1
> diff --git a/test/snapshot-input/commit/qemu-server/101.conf b/test/snapshot-input/commit/qemu-server/101.conf
> index 4ab1787..92c1f6a 100644
> --- a/test/snapshot-input/commit/qemu-server/101.conf
> +++ b/test/snapshot-input/commit/qemu-server/101.conf
> @@ -18,7 +18,7 @@ bootdisk: ide0
> cores: 4
> ide0: somestore:somedisk,discard=on,size=32G
> ide2: none,media=cdrom
> -machine: somemachine
> +machine: q35
> memory: 8192
> name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> diff --git a/test/snapshot-input/commit/qemu-server/102.conf b/test/snapshot-input/commit/qemu-server/102.conf
> index b62f2c6..99bca5e 100644
> --- a/test/snapshot-input/commit/qemu-server/102.conf
> +++ b/test/snapshot-input/commit/qemu-server/102.conf
> @@ -35,7 +35,7 @@ bootdisk: ide0
> cores: 4
> ide0: somestore:somedisk,discard=on,size=32G
> ide2: none,media=cdrom
> -machine: somemachine
> +machine: q35
> memory: 8192
> name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> diff --git a/test/snapshot-input/commit/qemu-server/201.conf b/test/snapshot-input/commit/qemu-server/201.conf
> index 63a6d77..f8e99dd 100644
> --- a/test/snapshot-input/commit/qemu-server/201.conf
> +++ b/test/snapshot-input/commit/qemu-server/201.conf
> @@ -34,7 +34,7 @@ bootdisk: ide0
> cores: 4
> ide0: somestore:somedisk,discard=on,size=32G
> ide2: none,media=cdrom
> -machine: somemachine
> +machine: q35
> memory: 8192
> name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> diff --git a/test/snapshot-input/commit/qemu-server/202.conf b/test/snapshot-input/commit/qemu-server/202.conf
> index 4c6b84d..a221ba0 100644
> --- a/test/snapshot-input/commit/qemu-server/202.conf
> +++ b/test/snapshot-input/commit/qemu-server/202.conf
> @@ -35,7 +35,7 @@ bootdisk: ide0
> cores: 4
> ide0: somestore:somedisk,discard=on,size=32G
> ide2: none,media=cdrom
> -machine: somemachine
> +machine: q35
> memory: 8192
> name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> diff --git a/test/snapshot-input/commit/qemu-server/203.conf b/test/snapshot-input/commit/qemu-server/203.conf
> index 5acf20d..e10b68e 100644
> --- a/test/snapshot-input/commit/qemu-server/203.conf
> +++ b/test/snapshot-input/commit/qemu-server/203.conf
> @@ -35,7 +35,7 @@ bootdisk: ide0
> cores: 4
> ide0: somestore:somedisk,discard=on,size=32G
> ide2: none,media=cdrom
> -machine: somemachine
> +machine: q35
> memory: 8192
> name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> diff --git a/test/snapshot-input/create/qemu-server/104.conf b/test/snapshot-input/create/qemu-server/104.conf
> index c521154..fe63204 100644
> --- a/test/snapshot-input/create/qemu-server/104.conf
> +++ b/test/snapshot-input/create/qemu-server/104.conf
> @@ -20,7 +20,7 @@ bootdisk: ide0
> cores: 4
> ide0: local:snapshotable-disk-1,discard=on,size=32G
> ide2: none,media=cdrom
> -machine: somemachine
> +machine: q35
> memory: 8192
> name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> diff --git a/test/snapshot-input/delete/qemu-server/101.conf b/test/snapshot-input/delete/qemu-server/101.conf
> index c521154..fe63204 100644
> --- a/test/snapshot-input/delete/qemu-server/101.conf
> +++ b/test/snapshot-input/delete/qemu-server/101.conf
> @@ -20,7 +20,7 @@ bootdisk: ide0
> cores: 4
> ide0: local:snapshotable-disk-1,discard=on,size=32G
> ide2: none,media=cdrom
> -machine: somemachine
> +machine: q35
> memory: 8192
> name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> diff --git a/test/snapshot-input/delete/qemu-server/203.conf b/test/snapshot-input/delete/qemu-server/203.conf
> index c406640..ed93cf7 100644
> --- a/test/snapshot-input/delete/qemu-server/203.conf
> +++ b/test/snapshot-input/delete/qemu-server/203.conf
> @@ -21,7 +21,7 @@ bootdisk: ide0
> cores: 4
> ide0: local:snapshotable-disk-1,discard=on,size=32G
> ide2: none,media=cdrom
> -machine: somemachine
> +machine: q35
> memory: 8192
> name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> diff --git a/test/snapshot-input/delete/qemu-server/204.conf b/test/snapshot-input/delete/qemu-server/204.conf
> index c521154..fe63204 100644
> --- a/test/snapshot-input/delete/qemu-server/204.conf
> +++ b/test/snapshot-input/delete/qemu-server/204.conf
> @@ -20,7 +20,7 @@ bootdisk: ide0
> cores: 4
> ide0: local:snapshotable-disk-1,discard=on,size=32G
> ide2: none,media=cdrom
> -machine: somemachine
> +machine: q35
> memory: 8192
> name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> diff --git a/test/snapshot-input/rollback/qemu-server/101.conf b/test/snapshot-input/rollback/qemu-server/101.conf
> index 4fea865..0fa6a61 100644
> --- a/test/snapshot-input/rollback/qemu-server/101.conf
> +++ b/test/snapshot-input/rollback/qemu-server/101.conf
> @@ -20,7 +20,7 @@ bootdisk: ide0
> cores: 4
> ide0: local:snapshotable-disk-1,discard=on,size=32G
> ide2: none,media=cdrom
> -machine: somemachine
> +machine: q35
> memory: 8192
> name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> diff --git a/test/snapshot-input/rollback/qemu-server/102.conf b/test/snapshot-input/rollback/qemu-server/102.conf
> index 8f0db83..3fcffe1 100644
> --- a/test/snapshot-input/rollback/qemu-server/102.conf
> +++ b/test/snapshot-input/rollback/qemu-server/102.conf
> @@ -4,7 +4,7 @@ bootdisk: ide2
> cores: 2
> ide0: local:snapshotable-disk-1,size=32G
> ide2: none,media=cdrom
> -machine: someothermachine
> +machine: pc
> memory: 4096
> name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> diff --git a/test/snapshot-input/rollback/qemu-server/103.conf b/test/snapshot-input/rollback/qemu-server/103.conf
> index 8f0db83..3fcffe1 100644
> --- a/test/snapshot-input/rollback/qemu-server/103.conf
> +++ b/test/snapshot-input/rollback/qemu-server/103.conf
> @@ -4,7 +4,7 @@ bootdisk: ide2
> cores: 2
> ide0: local:snapshotable-disk-1,size=32G
> ide2: none,media=cdrom
> -machine: someothermachine
> +machine: pc
> memory: 4096
> name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> diff --git a/test/snapshot-input/rollback/qemu-server/104.conf b/test/snapshot-input/rollback/qemu-server/104.conf
> index ff50151..2f12761 100644
> --- a/test/snapshot-input/rollback/qemu-server/104.conf
> +++ b/test/snapshot-input/rollback/qemu-server/104.conf
> @@ -4,7 +4,7 @@ bootdisk: ide2
> cores: 2
> ide0: local:snapshotable-disk-1,size=32G
> ide2: none,media=cdrom
> -machine: someothermachine
> +machine: pc
> memory: 4096
> name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> diff --git a/test/snapshot-input/rollback/qemu-server/106.conf b/test/snapshot-input/rollback/qemu-server/106.conf
> index 64bf9bf..56d7199 100644
> --- a/test/snapshot-input/rollback/qemu-server/106.conf
> +++ b/test/snapshot-input/rollback/qemu-server/106.conf
> @@ -3,7 +3,7 @@ bootdisk: ide0
> cores: 4
> ide0: local:snapshotable-disk-1,discard=on,size=32G
> ide2: none,media=cdrom
> -machine: someothermachine
> +machine: pc
> memory: 8192
> name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> @@ -21,7 +21,7 @@ bootdisk: ide0
> cores: 4
> ide0: local:snapshotable-disk-1,discard=on,size=32G
> ide2: none,media=cdrom
> -machine: somemachine
> +machine: q35
> memory: 8192
> name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> diff --git a/test/snapshot-input/rollback/qemu-server/201.conf b/test/snapshot-input/rollback/qemu-server/201.conf
> index c521154..fe63204 100644
> --- a/test/snapshot-input/rollback/qemu-server/201.conf
> +++ b/test/snapshot-input/rollback/qemu-server/201.conf
> @@ -20,7 +20,7 @@ bootdisk: ide0
> cores: 4
> ide0: local:snapshotable-disk-1,discard=on,size=32G
> ide2: none,media=cdrom
> -machine: somemachine
> +machine: q35
> memory: 8192
> name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> diff --git a/test/snapshot-input/rollback/qemu-server/202.conf b/test/snapshot-input/rollback/qemu-server/202.conf
> index 691f5a2..d09b5d0 100644
> --- a/test/snapshot-input/rollback/qemu-server/202.conf
> +++ b/test/snapshot-input/rollback/qemu-server/202.conf
> @@ -20,7 +20,7 @@ bootdisk: ide0
> cores: 4
> ide0: local:unsnapshotable-disk-1,discard=on,size=32G
> ide2: none,media=cdrom
> -machine: somemachine
> +machine: q35
> memory: 8192
> name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> diff --git a/test/snapshot-input/rollback/qemu-server/203.conf b/test/snapshot-input/rollback/qemu-server/203.conf
> index 6e53b27..8abf841 100644
> --- a/test/snapshot-input/rollback/qemu-server/203.conf
> +++ b/test/snapshot-input/rollback/qemu-server/203.conf
> @@ -20,7 +20,7 @@ bootdisk: ide0
> cores: 4
> ide0: local:snapshotable-disk-1,discard=on,size=32G
> ide2: none,media=cdrom
> -machine: somemachine
> +machine: q35
> memory: 8192
> name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> diff --git a/test/snapshot-input/rollback/qemu-server/204.conf b/test/snapshot-input/rollback/qemu-server/204.conf
> index c406640..ed93cf7 100644
> --- a/test/snapshot-input/rollback/qemu-server/204.conf
> +++ b/test/snapshot-input/rollback/qemu-server/204.conf
> @@ -21,7 +21,7 @@ bootdisk: ide0
> cores: 4
> ide0: local:snapshotable-disk-1,discard=on,size=32G
> ide2: none,media=cdrom
> -machine: somemachine
> +machine: q35
> memory: 8192
> name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> diff --git a/test/snapshot-input/rollback/qemu-server/205.conf b/test/snapshot-input/rollback/qemu-server/205.conf
> index c521154..fe63204 100644
> --- a/test/snapshot-input/rollback/qemu-server/205.conf
> +++ b/test/snapshot-input/rollback/qemu-server/205.conf
> @@ -20,7 +20,7 @@ bootdisk: ide0
> cores: 4
> ide0: local:snapshotable-disk-1,discard=on,size=32G
> ide2: none,media=cdrom
> -machine: somemachine
> +machine: q35
> memory: 8192
> name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> diff --git a/test/snapshot-input/rollback/qemu-server/301.conf b/test/snapshot-input/rollback/qemu-server/301.conf
> index c521154..fe63204 100644
> --- a/test/snapshot-input/rollback/qemu-server/301.conf
> +++ b/test/snapshot-input/rollback/qemu-server/301.conf
> @@ -20,7 +20,7 @@ bootdisk: ide0
> cores: 4
> ide0: local:snapshotable-disk-1,discard=on,size=32G
> ide2: none,media=cdrom
> -machine: somemachine
> +machine: q35
> memory: 8192
> name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> diff --git a/test/snapshot-input/rollback/qemu-server/302.conf b/test/snapshot-input/rollback/qemu-server/302.conf
> index 518c954..473a9a0 100644
> --- a/test/snapshot-input/rollback/qemu-server/302.conf
> +++ b/test/snapshot-input/rollback/qemu-server/302.conf
> @@ -26,7 +26,7 @@ name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> numa: 0
> ostype: win7
> -runningmachine: somemachine
> +runningmachine: q35
> smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
> snaptime: 1234567890
> sockets: 1
> diff --git a/test/snapshot-input/rollback/qemu-server/303.conf b/test/snapshot-input/rollback/qemu-server/303.conf
> index 518c954..473a9a0 100644
> --- a/test/snapshot-input/rollback/qemu-server/303.conf
> +++ b/test/snapshot-input/rollback/qemu-server/303.conf
> @@ -26,7 +26,7 @@ name: win
> net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
> numa: 0
> ostype: win7
> -runningmachine: somemachine
> +runningmachine: q35
> smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
> snaptime: 1234567890
> sockets: 1
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [pve-devel] [PATCH qemu-server] fix #3784: Parameter for guest vIOMMU & machine as property-string
2022-05-03 11:18 ` [pve-devel] [PATCH qemu-server] fix #3784: Parameter for guest vIOMMU & machine as property-string Markus Frank
@ 2022-07-20 11:28 ` Markus Frank
0 siblings, 0 replies; 9+ messages in thread
From: Markus Frank @ 2022-07-20 11:28 UTC (permalink / raw)
To: Proxmox VE development discussion
Ping
viommu-Patches:
1: [PATCH qemu-server 1/3] tests: replaced somemachine&someothermachine
with q35&pc
2: [PATCH qemu-server] fix #3784: Parameter for guest vIOMMU & machine
as property-string
3: [PATCH qemu-server] added test-cases for new machine-syntax & viommu
4: [PATCH manager] ui: MachineEdit with viommu checkbox
On 5/3/22 13:18, Markus Frank wrote:
> Changed the machine parameter to allow multiple machine-specific
> parameters via property_string, but also allow old configs (via
> default_key)
>
> possible-configurations-example:
> machine: q35
> machine: pc
> machine: q35,viommu=1
> machine: type=q35,viommu=1
>
> Also added a Parameter for vIOMMU so nobody has to use a github-script
> or change the kvm command on every vm boot.
> The args parameter doesn't work because the -device parameter(kvm)
> with intel-iommu has to be placed before the other arguments.
>
> vIOMMU enables the option to pass through pci devices to guest-vms
> inside guest-vms for nested Virtualisation.
>
> Signed-off-by: Markus Frank <m.frank@proxmox.com>
> ---
> PVE/API2/Qemu.pm | 7 ++---
> PVE/QemuConfig.pm | 3 ++-
> PVE/QemuServer.pm | 56 ++++++++++++++++++++++++++++++++++++---
> PVE/QemuServer/Machine.pm | 6 +++--
> 4 files changed, 63 insertions(+), 9 deletions(-)
>
> diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm
> index 71db264..661227f 100644
> --- a/PVE/API2/Qemu.pm
> +++ b/PVE/API2/Qemu.pm
> @@ -945,12 +945,13 @@ __PACKAGE__->register_method({
> if ((!defined($conf->{vmgenid}) || $conf->{vmgenid} eq '1') && $arch ne 'aarch64') {
> $conf->{vmgenid} = PVE::QemuServer::generate_uuid();
> }
> -
> - my $machine = $conf->{machine};
> + my $machine_conf = PVE::QemuServer::parse_machine($conf->{machine});
> + my $machine = $machine_conf->{type};
> if (!$machine || $machine =~ m/^(?:pc|q35|virt)$/) {
> # always pin Windows' machine version on create, they get to easily confused
> if (PVE::QemuServer::windows_version($conf->{ostype})) {
> - $conf->{machine} = PVE::QemuServer::windows_get_pinned_machine_version($machine);
> + $machine_conf->{type} = PVE::QemuServer::windows_get_pinned_machine_version($machine);
> + $conf->{machine} = print_property_string($machine_conf);
> }
> }
>
> diff --git a/PVE/QemuConfig.pm b/PVE/QemuConfig.pm
> index cfef8d3..b82076f 100644
> --- a/PVE/QemuConfig.pm
> +++ b/PVE/QemuConfig.pm
> @@ -430,7 +430,8 @@ sub __snapshot_rollback_hook {
> } else {
> # Note: old code did not store 'machine', so we try to be smart
> # and guess the snapshot was generated with kvm 1.4 (pc-i440fx-1.4).
> - $data->{forcemachine} = $conf->{machine} || 'pc-i440fx-1.4';
> + my $machine_conf = PVE::QemuServer::parse_machine($conf->{machine});
> + $data->{forcemachine} = $machine_conf->{type} || 'pc-i440fx-1.4';
>
> # we remove the 'machine' configuration if not explicitly specified
> # in the original config.
> diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
> index 5db10fe..fa2e449 100644
> --- a/PVE/QemuServer.pm
> +++ b/PVE/QemuServer.pm
> @@ -111,6 +111,25 @@ PVE::JSONSchema::register_standard_option('pve-qm-stateuri', {
> optional => 1,
> });
>
> +my $machine_fmt = {
> + type => {
> + default_key => 1,
> + type => 'string',
> + description => "Specifies the Qemu machine type.",
> + pattern => '(pc|pc(-i440fx)?-\d+(\.\d+)+(\+pve\d+)?(\.pxe)?|q35|pc-q35-\d+(\.\d+)+(\+pve\d+)?(\.pxe)?|virt(?:-\d+(\.\d+)+)?(\+pve\d+)?)',
> + format_description => "qemu-machine-type",
> + maxLength => 40,
> + optional => 1,
> + },
> + viommu => {
> + type => 'boolean',
> + description => "enable guest vIOMMU (needs kvm to be enabled and q35 to be set as machine)",
> + default => 0,
> + optional => 1,
> + },
> +};
> +PVE::JSONSchema::register_format('pve-qemu-machine-fmt', $machine_fmt);
> +
> PVE::JSONSchema::register_standard_option('pve-qemu-machine', {
> description => "Specifies the Qemu machine type.",
> type => 'string',
> @@ -627,7 +646,12 @@ EODESCR
> pattern => $PVE::QemuServer::CPUConfig::qemu_cmdline_cpu_re,
> format_description => 'QEMU -cpu parameter'
> },
> - machine => get_standard_option('pve-qemu-machine'),
> + machine => {
> + description => "Specifies the Qemu machine type.",
> + type => 'string',
> + optional => 1,
> + format => 'pve-qemu-machine-fmt',
> + },
> arch => {
> description => "Virtual processor architecture. Defaults to the host.",
> optional => 1,
> @@ -2085,6 +2109,16 @@ sub parse_watchdog {
> return $res;
> }
>
> +sub parse_machine {
> + my ($value) = @_;
> +
> + return if !$value;
> +
> + my $res = eval { parse_property_string($machine_fmt, $value) };
> + warn $@ if $@;
> + return $res;
> +}
> +
> sub parse_guest_agent {
> my ($conf) = @_;
>
> @@ -2156,8 +2190,9 @@ sub qemu_created_version_fixups {
> # check if we need to apply some handling for VMs that always use the latest machine version but
> # had a machine version transition happen that affected HW such that, e.g., an OS config change
> # would be required (we do not want to pin machine version for non-windows OS type)
> + my $machine_conf = parse_machine($conf->{machine});
> if (
> - (!defined($conf->{machine}) || $conf->{machine} =~ m/^(?:pc|q35|virt)$/) # non-versioned machine
> + (!defined($machine_conf->{type}) || $machine_conf->{type} =~ m/^(?:pc|q35|virt)$/) # non-versioned machine
> && (!defined($meta->{'creation-qemu'}) || !min_version($meta->{'creation-qemu'}, 6, 1)) # created before 6.1
> && (!$forced_vers || min_version($forced_vers, 6, 1)) # handle snapshot-rollback/migrations
> && min_version($kvmver, 6, 1) # only need to apply the change since 6.1
> @@ -3257,7 +3292,8 @@ sub windows_get_pinned_machine_version {
> sub get_vm_machine {
> my ($conf, $forcemachine, $arch, $add_pve_version, $kvmversion) = @_;
>
> - my $machine = $forcemachine || $conf->{machine};
> + my $machine_conf = parse_machine($conf->{machine});
> + my $machine = $forcemachine || $machine_conf->{type};
>
> if (!$machine || $machine =~ m/^(?:pc|q35|virt)$/) {
> $kvmversion //= kvm_user_version();
> @@ -3472,6 +3508,8 @@ sub config_to_command {
> my $kvm = $conf->{kvm};
> my $nodename = nodename();
>
> + my $machine_conf = parse_machine($conf->{machine});
> +
> my $arch = get_vm_arch($conf);
> my $kvm_binary = get_command_for_arch($arch);
> my $kvmver = kvm_user_version($kvm_binary);
> @@ -3525,6 +3563,14 @@ sub config_to_command {
> my $use_old_bios_files = undef;
> ($use_old_bios_files, $machine_type) = qemu_use_old_bios_files($machine_type);
>
> + if ($machine_conf->{viommu} && (!$kvm || !$q35)) {
> + die "to use vIOMMU please enable kvm and set the machine type to q35";
> + }
> +
> + if ($machine_conf->{viommu}) {
> + push @$devices, '-device', 'intel-iommu,intremap=on,caching-mode=on';
> + }
> +
> push @$cmd, $kvm_binary;
>
> push @$cmd, '-id', $vmid;
> @@ -4068,6 +4114,10 @@ sub config_to_command {
> }
> push @$machineFlags, "type=${machine_type_min}";
>
> + if ($machine_conf->{viommu}) {
> + push @$machineFlags, 'kernel-irqchip=split';
> + }
> +
> push @$cmd, @$devices;
> push @$cmd, '-rtc', join(',', @$rtcFlags) if scalar(@$rtcFlags);
> push @$cmd, '-machine', join(',', @$machineFlags) if scalar(@$machineFlags);
> diff --git a/PVE/QemuServer/Machine.pm b/PVE/QemuServer/Machine.pm
> index d9429ed..33f9a64 100644
> --- a/PVE/QemuServer/Machine.pm
> +++ b/PVE/QemuServer/Machine.pm
> @@ -15,7 +15,8 @@ our $PVE_MACHINE_VERSION = {
> sub machine_type_is_q35 {
> my ($conf) = @_;
>
> - return $conf->{machine} && ($conf->{machine} =~ m/q35/) ? 1 : 0;
> + my $machine_conf = PVE::QemuServer::parse_machine($conf->{machine});
> + return $machine_conf->{type} && ($machine_conf->{type} =~ m/q35/) ? 1 : 0;
> }
>
> sub current_from_query_machines {
> @@ -120,7 +121,8 @@ sub qemu_machine_pxe {
>
> my $machine = get_current_qemu_machine($vmid);
>
> - if ($conf->{machine} && $conf->{machine} =~ m/\.pxe$/) {
> + my $machine_conf = PVE::QemuServer::parse_machine($conf->{machine});
> + if ($conf->{machine} && $machine_conf->{type} =~ m/\.pxe$/) {
> $machine .= '.pxe';
> }
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [pve-devel] [PATCH manager] ui: MachineEdit with viommu checkbox
2022-09-21 9:07 ` [pve-devel] [PATCH manager] ui: MachineEdit with viommu checkbox Markus Frank
@ 2022-10-24 14:22 ` Dominik Csapak
0 siblings, 0 replies; 9+ messages in thread
From: Dominik Csapak @ 2022-10-24 14:22 UTC (permalink / raw)
To: Proxmox VE development discussion, Markus Frank
comments inline:
On 9/21/22 11:07, Markus Frank wrote:
> Added a Checkbox to enable viommu, if q35 is selected.
> Otherwise (i440fx) the checkbox is disabled.
>
> The UI also needs to parse the new machine parameter as PropertyString.
>
> Signed-off-by: Markus Frank <m.frank@proxmox.com>
> ---
> www/manager6/qemu/MachineEdit.js | 21 +++++++++++++++++++++
> 1 file changed, 21 insertions(+)
>
> diff --git a/www/manager6/qemu/MachineEdit.js b/www/manager6/qemu/MachineEdit.js
> index f928c80c..25661106 100644
> --- a/www/manager6/qemu/MachineEdit.js
> +++ b/www/manager6/qemu/MachineEdit.js
> @@ -17,6 +17,12 @@ Ext.define('PVE.qemu.MachineInputPanel', {
> let type = value === 'q35' ? 'q35' : 'i440fx';
> store.clearFilter();
> store.addFilter(val => val.data.id === 'latest' || val.data.type === type);
> + if (type === 'i440fx') {
> + me.lookup('viommu').setValue(false);
> + me.lookup('viommu').setDisabled(true);
> + } else {
> + me.lookup('viommu').setDisabled(false);
> + }
> if (!me.getView().isWindows) {
> version.setValue('latest');
> } else {
> @@ -40,12 +46,17 @@ Ext.define('PVE.qemu.MachineInputPanel', {
> delete values.delete;
> }
> delete values.version;
> + if (values.viommu) values.machine += ",viommu=1";
not really our style. we want {} and multiline if statements, see
https://pve.proxmox.com/wiki/Javascript_Style_Guide
> + delete values.viommu;
> return values;
> },
>
> setValues: function(values) {
> let me = this;
>
> + let machine_conf = PVE.Parser.parsePropertyString(values.machine, "type");
> + values.machine = machine_conf.type;
> +
> me.isWindows = values.isWindows;
> if (values.machine === 'pc') {
> values.machine = '__default__';
> @@ -54,10 +65,14 @@ Ext.define('PVE.qemu.MachineInputPanel', {
> if (me.isWindows) {
> if (values.machine === '__default__') {
> values.version = 'pc-i440fx-5.1';
> + values.viommu = false;
> } else if (values.machine === 'q35') {
> values.version = 'pc-q35-5.1';
> }
> }
> +
> + values.viommu = machine_conf.viommu === "1";
> +
> if (values.machine !== '__default__' && values.machine !== 'q35') {
> values.version = values.machine;
> values.machine = values.version.match(/q35/) ? 'q35' : '__default__';
> @@ -108,6 +123,12 @@ Ext.define('PVE.qemu.MachineInputPanel', {
> },
> },
> },
> + {
> + xtype: 'proxmoxcheckbox',
> + fieldLabel: gettext('vIOMMU'),
> + name: 'viommu',
> + reference: 'viommu',
> + },
> {
> xtype: 'displayfield',
> fieldLabel: gettext('Note'),
^ permalink raw reply [flat|nested] 9+ messages in thread
* [pve-devel] [PATCH manager] ui: MachineEdit with viommu checkbox
2022-09-21 9:07 [pve-devel] [PATCH qemu-server 0/3] vIOMMU-Feature Markus Frank
@ 2022-09-21 9:07 ` Markus Frank
2022-10-24 14:22 ` Dominik Csapak
0 siblings, 1 reply; 9+ messages in thread
From: Markus Frank @ 2022-09-21 9:07 UTC (permalink / raw)
To: pve-devel
Added a Checkbox to enable viommu, if q35 is selected.
Otherwise (i440fx) the checkbox is disabled.
The UI also needs to parse the new machine parameter as PropertyString.
Signed-off-by: Markus Frank <m.frank@proxmox.com>
---
www/manager6/qemu/MachineEdit.js | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/www/manager6/qemu/MachineEdit.js b/www/manager6/qemu/MachineEdit.js
index f928c80c..25661106 100644
--- a/www/manager6/qemu/MachineEdit.js
+++ b/www/manager6/qemu/MachineEdit.js
@@ -17,6 +17,12 @@ Ext.define('PVE.qemu.MachineInputPanel', {
let type = value === 'q35' ? 'q35' : 'i440fx';
store.clearFilter();
store.addFilter(val => val.data.id === 'latest' || val.data.type === type);
+ if (type === 'i440fx') {
+ me.lookup('viommu').setValue(false);
+ me.lookup('viommu').setDisabled(true);
+ } else {
+ me.lookup('viommu').setDisabled(false);
+ }
if (!me.getView().isWindows) {
version.setValue('latest');
} else {
@@ -40,12 +46,17 @@ Ext.define('PVE.qemu.MachineInputPanel', {
delete values.delete;
}
delete values.version;
+ if (values.viommu) values.machine += ",viommu=1";
+ delete values.viommu;
return values;
},
setValues: function(values) {
let me = this;
+ let machine_conf = PVE.Parser.parsePropertyString(values.machine, "type");
+ values.machine = machine_conf.type;
+
me.isWindows = values.isWindows;
if (values.machine === 'pc') {
values.machine = '__default__';
@@ -54,10 +65,14 @@ Ext.define('PVE.qemu.MachineInputPanel', {
if (me.isWindows) {
if (values.machine === '__default__') {
values.version = 'pc-i440fx-5.1';
+ values.viommu = false;
} else if (values.machine === 'q35') {
values.version = 'pc-q35-5.1';
}
}
+
+ values.viommu = machine_conf.viommu === "1";
+
if (values.machine !== '__default__' && values.machine !== 'q35') {
values.version = values.machine;
values.machine = values.version.match(/q35/) ? 'q35' : '__default__';
@@ -108,6 +123,12 @@ Ext.define('PVE.qemu.MachineInputPanel', {
},
},
},
+ {
+ xtype: 'proxmoxcheckbox',
+ fieldLabel: gettext('vIOMMU'),
+ name: 'viommu',
+ reference: 'viommu',
+ },
{
xtype: 'displayfield',
fieldLabel: gettext('Note'),
--
2.30.2
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2022-10-24 14:22 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-03 11:18 [pve-devel] [PATCH qemu-server 1/3] tests: replaced somemachine&someothermachine with q35&pc Markus Frank
2022-05-03 11:18 ` [pve-devel] [PATCH qemu-server] fix #3784: Parameter for guest vIOMMU & machine as property-string Markus Frank
2022-07-20 11:28 ` Markus Frank
2022-05-03 11:19 ` [pve-devel] [PATCH qemu-server] added test-cases for new machine-syntax & viommu Markus Frank
2022-05-03 11:19 ` [pve-devel] [PATCH manager] ui: MachineEdit with viommu checkbox Markus Frank
2022-05-04 7:57 ` [pve-devel] [PATCH qemu-server 1/3] tests: replaced somemachine&someothermachine with q35&pc Markus Frank
2022-05-05 11:08 ` Daniel Tschlatscher
2022-09-21 9:07 [pve-devel] [PATCH qemu-server 0/3] vIOMMU-Feature Markus Frank
2022-09-21 9:07 ` [pve-devel] [PATCH manager] ui: MachineEdit with viommu checkbox Markus Frank
2022-10-24 14:22 ` Dominik Csapak
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox