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 @@ - +