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

Dmitry Guryanov dguryanov at parallels.com
Tue Apr 7 20:35:08 UTC 2015


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 at 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




More information about the libvir-list mailing list