From: Tim Wiederhake Date: Thu, 25 Nov 2021 18:57:49 +0000 (+0100) Subject: virDomainDefFormatFeatures: Write attribute "mode" of element "hyperv" X-Git-Tag: v8.0.0-rc1~183 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5050b71da03fa644895299681835131d212f5516;p=thirdparty%2Flibvirt.git virDomainDefFormatFeatures: Write attribute "mode" of element "hyperv" Signed-off-by: Tim Wiederhake Reviewed-by: Ján Tomko --- diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 1a5afbfa41..0ae28a0a7c 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -27839,10 +27839,11 @@ virDomainDefFormatFeatures(virBuffer *buf, break; case VIR_DOMAIN_FEATURE_HYPERV: - if (def->features[i] != VIR_TRISTATE_SWITCH_ON) + if (def->features[i] == VIR_DOMAIN_HYPERV_MODE_NONE) break; - virBufferAddLit(&childBuf, "\n"); + virBufferAsprintf(&childBuf, "\n", + virDomainHyperVModeTypeToString(def->features[i])); virBufferAdjustIndent(&childBuf, 2); for (j = 0; j < VIR_DOMAIN_HYPERV_LAST; j++) { if (def->hyperv_features[j] == VIR_TRISTATE_SWITCH_ABSENT) diff --git a/tests/qemuxml2xmloutdata/hyperv-off.xml b/tests/qemuxml2xmloutdata/hyperv-off.xml index 20c7f653af..94288e2516 100644 --- a/tests/qemuxml2xmloutdata/hyperv-off.xml +++ b/tests/qemuxml2xmloutdata/hyperv-off.xml @@ -10,7 +10,7 @@ - + diff --git a/tests/qemuxml2xmloutdata/hyperv-stimer-direct.xml b/tests/qemuxml2xmloutdata/hyperv-stimer-direct.xml index d49eb75b12..3710191d75 100644 --- a/tests/qemuxml2xmloutdata/hyperv-stimer-direct.xml +++ b/tests/qemuxml2xmloutdata/hyperv-stimer-direct.xml @@ -10,7 +10,7 @@ - + diff --git a/tests/qemuxml2xmloutdata/hyperv.xml b/tests/qemuxml2xmloutdata/hyperv.xml index 00af005671..87f09257c7 100644 --- a/tests/qemuxml2xmloutdata/hyperv.xml +++ b/tests/qemuxml2xmloutdata/hyperv.xml @@ -10,7 +10,7 @@ - +