]> git.proxmox.com Git - qemu-server.git/commitdiff
use machine version in vga default type selection
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 12 Jul 2017 05:34:51 +0000 (07:34 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Mon, 17 Jul 2017 09:16:49 +0000 (11:16 +0200)
If we get an VM machine older than 2.9 we use the old selection
expression for the VGA type. This allows to live migrate VMs to PVE
5.0 from beta 1 and PVE 4.4 again.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
PVE/QemuServer.pm

index 98cd76239ef4aced3cc5dfef9386062ec56a408e..1f341017e7c1c0413bd977e8452b05e9de6b6557 100644 (file)
@@ -2925,7 +2925,11 @@ sub config_to_command {
     $vga = 'qxl' if $qxlnum;
 
     if (!$vga) {
-       $vga = (!$winversion || $winversion >= 6) ? 'std' : 'cirrus';
+       if (qemu_machine_feature_enabled($machine_type, $kvmver, 2, 9)) {
+           $vga = (!$winversion || $winversion >= 6) ? 'std' : 'cirrus';
+       } else {
+           $vga = ($winversion >= 6) ? 'std' : 'cirrus';
+       }
     }
 
     # enable absolute mouse coordinates (needed by vnc)