The logic setting a device default should be in the post parse function of individual driver code. Signed-off-by: Rafael Fonseca <r4f4rfs@xxxxxxxxx> --- src/conf/domain_conf.c | 2 -- src/vmware/vmware_driver.c | 4 ++++ src/vmx/vmx.c | 4 ++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index e6a3500b7a..53bc791e10 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -15728,8 +15728,6 @@ virDomainVideoDefaultType(const virDomainDef *def) return VIR_DOMAIN_VIDEO_TYPE_VBOX; case VIR_DOMAIN_VIRT_VMWARE: - return VIR_DOMAIN_VIDEO_TYPE_VMVGA; - case VIR_DOMAIN_VIRT_VZ: case VIR_DOMAIN_VIRT_PARALLELS: case VIR_DOMAIN_VIRT_XEN: diff --git a/src/vmware/vmware_driver.c b/src/vmware/vmware_driver.c index 32c81b13a0..d5dd6e4f5e 100644 --- a/src/vmware/vmware_driver.c +++ b/src/vmware/vmware_driver.c @@ -137,6 +137,10 @@ vmwareDomainDeviceDefPostParse(virDomainDeviceDefPtr dev G_GNUC_UNUSED, void *opaque G_GNUC_UNUSED, void *parseOpaque G_GNUC_UNUSED) { + if (dev->type == VIR_DOMAIN_DEVICE_VIDEO && + dev->data.video->type == VIR_DOMAIN_VIDEO_TYPE_DEFAULT) + dev->data.video->type = VIR_DOMAIN_VIDEO_TYPE_VMVGA; + return 0; } diff --git a/src/vmx/vmx.c b/src/vmx/vmx.c index 6c6ef7acf3..b1fd1181eb 100644 --- a/src/vmx/vmx.c +++ b/src/vmx/vmx.c @@ -548,6 +548,10 @@ virVMXDomainDevicesDefPostParse(virDomainDeviceDefPtr dev G_GNUC_UNUSED, void *opaque G_GNUC_UNUSED, void *parseOpaque G_GNUC_UNUSED) { + if (dev->type == VIR_DOMAIN_DEVICE_VIDEO && + dev->data.video->type == VIR_DOMAIN_VIDEO_TYPE_DEFAULT) + dev->data.video->type = VIR_DOMAIN_VIDEO_TYPE_VMVGA; + return 0; } -- 2.25.1