With this, XML fails if non-virtio video devices have virtio
options. Previously it didn't raise error.
Resolves:
https://bugzilla.redhat.com/show_bug.cgi?id=1922093
Signed-off-by: Kristina Hanicova <khanicov(a)redhat.com>
---
src/conf/domain_validate.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/conf/domain_validate.c b/src/conf/domain_validate.c
index dabdd7b8eb..b53f6437cc 100644
--- a/src/conf/domain_validate.c
+++ b/src/conf/domain_validate.c
@@ -179,6 +179,10 @@ virDomainVideoDefValidate(const virDomainVideoDef *video,
}
}
+ if (video->type != VIR_DOMAIN_VIDEO_TYPE_VIRTIO &&
+ (virDomainCheckVirtioOptionsAreAbsent(video->virtio) < 0))
+ return -1;
+
return 0;
}
--
2.29.2