From: Michal Privoznik Date: Tue, 21 Mar 2017 14:23:35 +0000 (+0100) Subject: domain_capabilities: Don't report machine type for bhyve X-Git-Tag: v3.2.0-rc1~191 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=df769041c213f7bdc19bb9233e7ca53c6d80c458;p=thirdparty%2Flibvirt.git 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 --- 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)