Xen 4.17 has strict parsing of 'soundhw' option that allows only specific values (instead of passing through any value directly to qemu's -soundhw option, it uses -device now). For 'intel-hda' audio device, it requires "hda" string. "hda" works with older libxl too. Other supported models are the same as in libvirt XML. Signed-off-by: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx> --- src/libxl/libxl_conf.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c index d13e48abb2..b84257bc12 100644 --- a/src/libxl/libxl_conf.c +++ b/src/libxl/libxl_conf.c @@ -593,7 +593,26 @@ libxlMakeDomBuildInfo(virDomainDef *def, */ virDomainSoundDef *snd = def->sounds[0]; - b_info->u.hvm.soundhw = g_strdup(virDomainSoundModelTypeToString(snd->model)); + switch (snd->model) { + case VIR_DOMAIN_SOUND_MODEL_ICH6: + b_info->u.hvm.soundhw = g_strdup("hda"); + break; + case VIR_DOMAIN_SOUND_MODEL_ES1370: + case VIR_DOMAIN_SOUND_MODEL_AC97: + case VIR_DOMAIN_SOUND_MODEL_SB16: + b_info->u.hvm.soundhw = g_strdup(virDomainSoundModelTypeToString(snd->model)); + break; + default: + case VIR_DOMAIN_SOUND_MODEL_PCSPK: + case VIR_DOMAIN_SOUND_MODEL_ICH7: + case VIR_DOMAIN_SOUND_MODEL_USB: + case VIR_DOMAIN_SOUND_MODEL_ICH9: + case VIR_DOMAIN_SOUND_MODEL_LAST: + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("unsupported audio model %s"), + virDomainSoundModelTypeToString(snd->model)); + return -1; + } } for (i = 0; i < def->os.nBootDevs; i++) { -- 2.37.3