1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-03-07 17:28:15 +00:00

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>
This commit is contained in:
Dmitry Guryanov 2015-04-07 23:35:08 +03:00 committed by Michal Privoznik
parent 0d572b6982
commit 756f8dcd40

View File

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