[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH v3 09/14] conf: return proper default video type for parallels



Fix function virDomainVideoDefaultType for
parallels VMs and containers. It should return
VGA for VMs and VIR_DOMAIN_VIDEO_TYPE_PARALLELS
for containers.

Signed-off-by: Dmitry Guryanov <dguryanov parallels com>
---
 src/conf/domain_conf.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 0ae45e1..c38a53c 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -10968,6 +10968,16 @@ virDomainVideoDefaultType(const virDomainDef *def)
     case VIR_DOMAIN_VIRT_VMWARE:
         return VIR_DOMAIN_VIDEO_TYPE_VMVGA;
 
+    case VIR_DOMAIN_VIRT_PARALLELS:
+        if (def->os.type) {
+            if (STREQ(def->os.type, "hvm"))
+                return VIR_DOMAIN_VIDEO_TYPE_VGA;
+            else
+                return VIR_DOMAIN_VIDEO_TYPE_PARALLELS;
+        } else {
+            return VIR_DOMAIN_VIDEO_TYPE_VGA;
+        }
+
     default:
         return -1;
     }
-- 
2.1.0


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]