From df769041c213f7bdc19bb9233e7ca53c6d80c458 Mon Sep 17 00:00:00 2001 From: Michal Privoznik Date: Tue, 21 Mar 2017 15:23:35 +0100 Subject: [PATCH] domain_capabilities: Don't report machine type for bhyve For some drivers the domain's machine type makes no sense. They just don't use it. A great example is bhyve driver. Therefore it makes very less sense to report machine in domain capabilities XML. Signed-off-by: Michal Privoznik --- docs/formatdomaincaps.html.in | 3 ++- src/conf/domain_capabilities.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/formatdomaincaps.html.in b/docs/formatdomaincaps.html.in index 648e3d481e..007cab62dc 100644 --- a/docs/formatdomaincaps.html.in +++ b/docs/formatdomaincaps.html.in @@ -70,7 +70,8 @@
machine
The domain's machine - type.
+ type. Since not every hypervisor has a sense of machine types + this element might be omitted in such drivers.
arch
The domain's diff --git a/src/conf/domain_capabilities.c b/src/conf/domain_capabilities.c index bb6742359b..7a3d2e6fb1 100644 --- a/src/conf/domain_capabilities.c +++ b/src/conf/domain_capabilities.c @@ -527,7 +527,8 @@ virDomainCapsFormatInternal(virBufferPtr buf, virBufferEscapeString(buf, "%s\n", caps->path); virBufferAsprintf(buf, "%s\n", virttype_str); - virBufferAsprintf(buf, "%s\n", caps->machine); + if (caps->machine) + virBufferAsprintf(buf, "%s\n", caps->machine); virBufferAsprintf(buf, "%s\n", arch_str); if (caps->maxvcpus) -- 2.47.2