The logic setting a device default should be in the post parse function
of individual driver code.
Signed-off-by: Rafael Fonseca <r4f4rfs(a)gmail.com>
---
src/bhyve/bhyve_domain.c | 5 +++++
src/conf/domain_conf.c | 1 -
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/bhyve/bhyve_domain.c b/src/bhyve/bhyve_domain.c
index a2a0619846..40ee461b19 100644
--- a/src/bhyve/bhyve_domain.c
+++ b/src/bhyve/bhyve_domain.c
@@ -161,6 +161,11 @@ bhyveDomainDeviceDefPostParse(virDomainDeviceDefPtr dev,
}
}
+ if (dev->type == VIR_DOMAIN_DEVICE_VIDEO &&
+ dev->data.video.type == VIR_DOMAIN_VIDEO_TYPE_DEFAULT) {
+ dev->data.video.type = VIR_DOMAIN_VIDEO_TYPE_GOP;
+ }
+
return 0;
}
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index a88a5a744e..957989e848 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -15738,7 +15738,6 @@ virDomainVideoDefaultType(const virDomainDef *def)
else
return VIR_DOMAIN_VIDEO_TYPE_PARALLELS;
case VIR_DOMAIN_VIRT_BHYVE:
- return VIR_DOMAIN_VIDEO_TYPE_GOP;
case VIR_DOMAIN_VIRT_QEMU:
case VIR_DOMAIN_VIRT_KQEMU:
case VIR_DOMAIN_VIRT_KVM:
--
2.25.1