[Bug 1201994] Xen DomU unable to emulate audio device
https://bugzilla.suse.com/show_bug.cgi?id=1201994 https://bugzilla.suse.com/show_bug.cgi?id=1201994#c2 --- Comment #2 from Erwin Pacua <erwin.pacua@gmail.com> --- (In reply to James Fehlig from comment #1)
(In reply to Erwin Pacua from comment #0)
On OpenSUSE 15.3, the xl toolstack is able to emulate an audio device on a domU using the parameter:
soundhw="ac97"
and I can use the audio device no prob.
Since I've reinstalled to 15.4, that parameter is now deprecated and is now replaced by "device=..." as per log file
[root@pc1:/var/log/xen]# cat qemu-dm-winxp.log qemu-system-i386: warning: '-soundhw ac97' is deprecated, please use '-device AC97' instead audio: warning: Using timer based audio emulation
So I went ahead and tried the new parameter to no effect.
Why is it that the man page for xl.cfg still mentions soundhw= if that is no longer supported?
The message is from qemu, and it is only a deprecation warning. '-soundhw ac97' still works, but '-device AC97' is preferred. Is it not working for you?
That is correct. Neither '-soundhw ac97' or '-device AC97' works. The only difference is that with '-soundhw', xl complains and failed to start the domU while with '-device AC97', domU runs but without an emulated sound card. That is happening on all my vms (fedora, ubuntu, windows xp/7/10).
So I tried different combinations of: audiodev = "pa,id=snd0" device = "AC97" # ...and ac97. I also tried device=["ac97"] audio = "ac97"
The xl.cfg setting will not change. soundhw="ac97" should continue to work as is. What needs to change is how libxl invokes qemu when soundhw= is specified in a xl.cfg file. Instead of invoking qemu with '-soundhw <valid-sounddev-name>' it should use '-device <valid-sounddev-name>'.
For cases where libxl has not yet switched from a deprecated qemu option, or cases where libxl does not support a qemu option, libxl does support passing arbitrary options to qemu using the 'device_model_args' xl.cfg setting. E.g. in your case you could comment the soundhw setting and instead use
device_model_args = [ "-device", "AC97" ]
This one did not work either.
That should silence the qemu warning. In the meantime we'll need to work with the upstream Xen community to change libxl.
I also tried vsnd and followed the exact sample as per xl.cfg man page. vsnd = [ ['CARD, short-name=Main, sample-formats=s16_le;s8;u32_be', 'PCM, name=Main', 'STREAM, id=0, type=p', ] ]
Virtual sounds cards are not the same as emulated ones. I doubt WinXP supports any virtual sound cards, but I'm sure it has a driver for the Intel AC-97.
but the id=0 failed big time saying it is not valid. wtf???
It's ok, calm down :-). The message is only a deprecation warning and things should continue to work as usual.
I tried it on fedora and ubuntu vms as well got the same result, ie the id=0 is being rejected. By the way, here's an additional info. The xen package is from official repo. Unlike in 15.3, I did not use the Virtualization repo. [root@pc1:/etc/xen/vm]# rg PRETTY_NAME /etc/os-release; zypper info xen qemu | rg -A4 '^Name' 6:PRETTY_NAME="openSUSE Leap 15.4" Name : xen Version : 4.16.1_06-150400.4.8.1 Arch : x86_64 Vendor : SUSE LLC <https://www.suse.com/> Installed Size : 69.2 MiB -- Name : qemu Version : 6.2.0-150400.37.5.3 Arch : x86_64 Vendor : SUSE LLC <https://www.suse.com/> Installed Size : 14.2 MiB [root@pc1:/etc/xen/vm]# [root@pc1:/etc/xen/vm]# rg -v '^\s*#' winxp.cfg | sed '/^$/d'; echo -e '\n-------------------------------\n'; rg -v '^\s*#' fedora.cfg | sed '/^$/d' name = "winxp" type = "hvm" vcpus = 2 memory = 768 maxmem = 768 xen_platform_pci = 1 vif = [ 'bridge=br10, mac=00:16:3e:4e:f9:22' ] viridian = [ 'all' ] device_model_args = ["-device", "AC97"] vnc = 0 vga = "qxl" videoram = "256" vfb = ["type=virtio"] spice = 1 spicehost = "127.0.0.1" spiceport = 2003 spicedisable_ticketing = 1 spice_clipboard_sharing = 1 spice_streaming_video = "off" spice_image_compression = "off" disk = [ "/home/erwinp/xen/images/i386/windows/winxp.img,raw,xvda,rw", ] on_poweroff = "destroy" on_restart = "restart" boot = "c" ------------------------------- name = "fedora" type = "hvm" xen_platform_pci = 1 memory = 3000 maxmem = 3000 vcpus = 2 soundhw = "ac97" opengl = 0 vga = "stdvga" vnc = 1 spice = 1 spicehost = "127.0.0.1" spiceport = 2006 spicedisable_ticketing = 1 spicevdagent = 1 spice_image_compression = "off" vif = [ 'bridge=xenbr20, mac=00:16:3e:4e:f9:29, model=e1000' ] disk = [ '/home/erwinp/xen/images/x86_64/linux/fedora35/fedora35.img,raw,xvda,rw', ] on_poweroff = "destroy" serial = "pty" boot = "c" And here's the output when I tried to fire up one of them [root@pc1:/etc/xen/vm]# xl list Name ID Mem VCPUs State Time(s) Domain-0 0 4000 4 r----- 2057.3 Xenstore 1 31 1 -b---- 0.2 [root@pc1:/etc/xen/vm]# [root@pc1:/etc/xen/vm]# xl create fedora.cfg Parsing config from fedora.cfg libxl: warning: libxl_dm.c:1220:libxl__suse_node_to_path: replacing '/home/erwinp/xen/images/x86_64/linux/fedora35/fedora35.img' with '/dev/loop0' from /local/domain/0/backend/vbd/13/51712/node, just for qemu-xen libxl: error: libxl_dm.c:3173:device_model_spawn_outcome: Domain 13:domain 13 device model: spawn failed (rc=-3) libxl: error: libxl_dm.c:3393:device_model_postconfig_done: Domain 13:Post DM startup configs failed, rc=-3 libxl: error: libxl_create.c:1869:domcreate_devmodel_started: Domain 13:device model did not start: -3 libxl: error: libxl_aoutils.c:652:libxl__kill_xs_path: Device Model already exited libxl: error: libxl_domain.c:1202:libxl__destroy_domid: Domain 13:Non-existant domain libxl: error: libxl_domain.c:1156:domain_destroy_callback: Domain 13:Unable to destroy guest libxl: error: libxl_domain.c:1083:domain_destroy_cb: Domain 13:Destruction of domain failed [root@pc1:/etc/xen/vm]# [root@pc1:/etc/xen/vm]# [root@pc1:/etc/xen/vm]# cat /var/log/xen/qemu-dm-fedora.log char device redirected to /dev/pts/8 (label serial0) qemu-system-i386: warning: '-soundhw ac97' is deprecated, please use '-device AC97' instead audio: warning: Using timer based audio emulation [root@pc1:/etc/xen/vm]# [root@pc1:/etc/xen/vm]# xl list Name ID Mem VCPUs State Time(s) Domain-0 0 4000 4 r----- 2059.2 Xenstore 1 31 1 -b---- 0.2 -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@suse.com